![]() |
Modifying Tags - where and how?
Hello together!
I'm new here and at the moment I'm setting up my new photoblog. Well, all went quite well so far, but now I have a problem: I want my site to show the number of comments INSIDE the comments link. Finally it should look like: HTML Code:
<a href="#">x Comments</a>So I tried to modify the function of the tag; I found it only in the file index.php. I immagined something like replacing PHP Code:
PHP Code:
Can anyone give me a hint? Would be great! Thanks in advance, Tino |
Hi Tino, we have an excellent search on this forum. Look what I managed to dig up:
http://www.pixelpost.org/forum/showt...umber+template http://www.pixelpost.org/forum/showt...umber+template http://www.pixelpost.org/forum/showt...umber+template http://www.pixelpost.org/forum/showt...umber+template http://www.pixelpost.org/forum/showt...umber+template http://www.pixelpost.org/forum/showt...umber+template http://www.pixelpost.org/forum/showt...umber+template Depending on what your template uses you might want to look in the image_template.html for the link to the comments. Best of luck! |
Hi Dennis! Thanks for your answer.
Yes, of course I used the search function before I posted and I got more or less all the threads you've linked to as well. I think my problem is another: changing the look of the template is not a problem – I wrote my own one anyway; own template image, own css-file. I want to change the tag's EFFECTS. For example: I want the tag <COMMENT_POPUP> to type out not only the comment popup link, but the comment popup link AND the numbers of comments too. Or, to give another example, I want to add a specific css-class to the "a:link" which is generated by the tag <IMAGE_LAST_LINK>. Do you know what I mean? I tried that changing the code in the index.php-file because I thought the tag-functions are defined there. I described that it in my first post, but it didn't effect anything. I hope I made more clearly what I want. Or did I just overlooked something? Thanks again, Tino |
You were on the right track the first time.
You applied the correct code but in the wrong place. You will only see your code change if you have disabled commenting for that image. You'll have to make the same modification to the code just below the code you already modified. Code:
$tpl = ereg_replace("<COMMENT_POPUP>","<a href='index.php?showimage=$image_id' onclick=\"window.open('index.php?popup=comment&showimage=$image_id','Comments','width=480,height=540,scrollbars=yes,resizable=yes');\">$lang_comment_popup, $image_comments_number</a>",$tpl); |
THAT was it!
Thanks alot! Im not very well versed in PHP and I just overlooked it... Of course I didn't see any changes then. I was just too fixated on that one that it simply didn't cross my mind to test it with another tag function. Thanks again! |
| All times are GMT. The time now is 11:59 PM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.