PDA

View Full Version : Show text + submit link if no links in category


Nobody
09-08-2005, 09:55 PM
If you go to a category and there are no links submitted in there yet, of course there should be a text saying "No links in this cateogry yet. You may _submit_your_link,_click_here_!"

- Kind of.

Folks! We need it. Perhaps make it optional in the admin.

yktan
09-09-2005, 03:37 AM
Hi Nobody, here's a fast fix for what you want.

Open up \templates\main.tpl
Find:
Content visible to registered users only.
Add below:
Content visible to registered users only.

I haven't tested the code, but it should work. Tell me how it goes.

Regards,
York Kie

ndemi
09-15-2005, 03:18 PM
Content visible to registered users only.

Works great - thanks.

ndemi

Nobody
09-15-2005, 08:33 PM
Great deal!

Thanks yktan, it do works. I added it to the Wiki (your credits included).

Nobody
09-17-2005, 09:53 AM
Actually, I had to take this function down from my directory, because of that it suddenly appeared at the index.php (root category, 0). And it's not preferable. I'd like it to only appear in subcategories, where none still had a link submitted. Not in the index. I don't want anybody to have a link submitted in the "top" of the category. :)

Anybody have any ideas how to fix this?

Nobody
09-17-2005, 10:12 AM
No probs dudes, found the answer in the Wiki. Thanks to Marksman!

WebDesignPoint
09-17-2005, 12:49 PM
Change the line:
Content visible to registered users only.
To:
Content visible to registered users only.

Nobody
09-17-2005, 01:25 PM
May I ask why so, because it works with the original code?

WebDesignPoint
09-17-2005, 03:33 PM
Content visible to registered users only.That code stops it from appearing on the index.php page.

Nobody
09-17-2005, 08:34 PM
Yeah but there is another solution to this in the Wiki that differs from your code. Wich should I use?

WebDesignPoint
09-17-2005, 11:33 PM
I didn't realise the wiki had this info.

The code I provided won't display the text and submit link on any sub category page if there are featured links on the page.

If that's not what you want, use the code in the wiki instead.

Nobody
09-18-2005, 09:40 AM
I'd rather stick to having the text even on pages with featured links.

Thanks man.