Announcement

Your account requires approval. Please contact us at adultsearchscript@gmail.com to activate your account. Thank you!

#1 2014-05-03 19:32:09

newxxx
Member
Registered: 2014-04-25
Posts: 124

Put total videos in header ?

is there a way to put the total number of videos on the site, in the header?

if so, how ?

it shows on the "most recent" page: http://www.mypornoclips.com/search/?o=recent

i was curious if there was a way to put it on the front page, as well

thank you!

Last edited by newxxx (2014-05-03 19:46:23)

Offline

#2 2014-05-04 06:26:20

symtab
Administrator
Registered: 2014-03-12
Posts: 134

Re: Put total videos in header ?

Add this templates/your-template/widgets/total_videos.widget.php:

<?php
function template_widget_total_videos()
{
$db = Database::factory();
$db->query("SELECT COUNT(*) AS total_videos FROM #__video");

return $db->fetch_field('total_videos');
}
?>

and in templates/your-template/footer.tpl.php (wherever you want the number tot appear) add:

<?php echo w('total_videos'); ?>

Offline

#3 2014-05-04 15:26:52

newxxx
Member
Registered: 2014-04-25
Posts: 124

Re: Put total videos in header ?

symtab wrote:

Add this templates/your-template/widgets/total_videos.widget.php:


are you saying that i need to create a new template called total-videos.widget.php  ?


does it go /templates/tube/extend/widgets/total_videos.widget.php   ????


and for the "create" pull-down menu in cpanel

do i choose:
text document
html document
perl document
shell document

there is no "php document" option to choose from

(sorry, i don't know)

thank you

Last edited by newxxx (2014-05-04 15:32:58)

Offline

#4 2014-05-04 22:51:50

videocasalinghi
Member
Registered: 2014-04-25
Posts: 10

Re: Put total videos in header ?

you must use a text editor or notepad windows
or download In my italian forum file

Offline

#5 2014-05-05 16:55:43

newxxx
Member
Registered: 2014-04-25
Posts: 124

Re: Put total videos in header ?

i've tried notepad, and it killed my website

so i deleted the file

Offline

#6 2014-05-05 17:44:57

videocasalinghi
Member
Registered: 2014-04-25
Posts: 10

Re: Put total videos in header ?

newxxx you did something wrong step download the file from my previous post

Offline

Board footer

Powered by FluxBB