PDA

View Full Version : Display total number of links on homepage?


john34
02-17-2006, 09:14 PM
Is there way to Display the total number of links live on your homepage?

bigdog
02-17-2006, 11:01 PM
This might work for you:

Content visible to registered users only.


Good luck,

Bill :D

Content visible to registered users only.

jay275
02-25-2006, 03:25 AM
I am also wanting to do this. It didn't seem to work for me BigDog. Lot's of php errors. Any more ideas on how to do this?

Boby
02-25-2006, 03:39 AM
Strange, bigdogs script is running very well on my installation :)

However, if you want to integrate the resulted number into your template I would suggest to add this line to index.phpContent visible to registered users only.
on the bottom of the file, above Content visible to registered users only.

Then in you main.tpl or whatever template file add:Content visible to registered users only.

It's exactly the same thing as bigdogs, just it integrates into the template and is not shown eighter on top or on bottom of the page.

Boby

bigdog
02-25-2006, 03:46 AM
Yikes!! I wasn't very user friendly. Boby, thanks for clearing up what I left out.

jay275
02-25-2006, 05:48 PM
Thanks so much to you both for your help. I never usually have this much trouble, but I still can't get the darn thing to work. At least there are no errors now, just the Total Links: then blank after it.

Just to confirm, in the index.php I put:
Content visible to registered users only.

Then in my main.tpl
Content visible to registered users only.

Am I missing something simple?

Neticus
02-25-2006, 06:37 PM
I presume you're using phpld2?

Then try this perhaps:

{topic no longer availalble}


Works for me and i'm using 3.02

Net.

Neticus
02-25-2006, 06:53 PM
Oh, and if you want it on the homepage only then wrap the main.tpl code with this code:

Content visible to registered users only.

But I suspect you already knew that :)

Out.

bigdog
02-25-2006, 07:26 PM
$total_links is an array that you have to extract the values from in your template. So this is what Net is suggesting, {$total_links[1]}, I think.

Neticus
02-25-2006, 08:21 PM
Content visible to registered users only.

I don't know, im just suggesting he trys the mod link i gave him and if he wants it on his home page only then wrap the mods main.tpl code with the code posted in my second post.

Aloha :)

jay275
02-25-2006, 08:58 PM
Neticus: Thanks so much, works perfectly now. This forum rocks.