Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > SUPPORT / INFORMATION > Pixelpost Help

Post Reply
 
Thread Tools
  #1  
Old 03-30-2008, 05:01 PM
photographic.cl Offline
forum loafer
 
Join Date: Mar 2008
Posts: 3
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>
To get that, I tried to include the tag <comments_number> in <comments_popup>, but that didn't worked.
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:
$tpl ereg_replace("<COMMENT_POPUP>","<a href='index.php?showimage=$image_id' onclick=\"alert('$lang_comment_popup_disabled');\">$lang_comment_popupr</a>",$tpl); 
with

PHP Code:
$tpl ereg_replace("<COMMENT_POPUP>","<a href='index.php?showimage=$image_id' onclick=\"alert('$lang_comment_popup_disabled');\">$lang_comment_popup, $image_comments_number</a>",$tpl); 
But all my trials didn't work - the index.php file seemed not to react.

Can anyone give me a hint? Would be great!
Thanks in advance,

Tino
Reply With Quote
  #2  
Old 03-30-2008, 05:22 PM
Dennis's Avatar
Dennis+ Offline
Team Pixelpost
 
Join Date: Jul 2006
Posts: 2,394
Send a message via MSN to Dennis
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!
__________________
My photoblog, powered by PixelPost 1.9 dev SVN | My Pixelpost Addons | My Cool Photoblog profile
Reply With Quote
  #3  
Old 03-31-2008, 03:31 PM
photographic.cl Offline
forum loafer
 
Join Date: Mar 2008
Posts: 3
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
Reply With Quote
  #4  
Old 03-31-2008, 04:25 PM
Dkozikowski's Avatar
Dkozikowski+ Offline
Team Pixelpost
 
Join Date: Oct 2005
Posts: 1,855
Send a message via AIM to Dkozikowski
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&amp;showimage=$image_id','Comments','width=480,height=540,scrollbars=yes,resizable=yes');\">$lang_comment_popup, $image_comments_number</a>",$tpl);
Reply With Quote
  #5  
Old 03-31-2008, 04:38 PM
photographic.cl Offline
forum loafer
 
Join Date: Mar 2008
Posts: 3
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!
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 11:49 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs