View Full Version : show images as comment in html?
posefius
08-28-2006, 06:50 AM
Why are all the images in the database included as comment in the generated html files. Sometimes when the browser loads the html file and the traffic is interrupted the hyperinks of this images are showed.
Is there a solution for this problem?
Connie
08-28-2006, 07:03 AM
Posefius, there is a solution depending on which TAGs you use
look into the template (I guess you mean image-template.html?)
which tags do you use for embedding the image, which tags are used for ALT and TITLE attribute
you can define that as you like in the template
Dennis
08-28-2006, 07:03 AM
I'm not sure what you mean? The default comment files show a thumbnail of the photo you're commenting on. Is this behaviour what you describe in your post?
If you would like to design your own html for comments have a look at the addon I wrote: http://forum.pixelpost.org/showthread.php?t=4813
posefius
08-28-2006, 07:16 AM
I mean the folowing behaviour at the end of the generated html from the image_template.html right before the /body and /html:
<!--
<a href="http://www.dutchphotoday.nl/index.php?showimage=14" title="Human Wisdom I"></a>
<a href="http://www.dutchphotoday.nl/index.php?showimage=17" title="Wood I"></a>
<a href="http://www.dutchphotoday.nl/index.php?showimage=18" title="Rusty People"></a>
<a href="http://www.dutchphotoday.nl/index.php?showimage=16" title="Town Hall"></a> ....... and many more .......
-->
</body>
</html>
In the image_template.html I use the following coding to display the image:
<a href="index.php?showimage=<IMAGE_PREVIOUS_ID>"><img src="images/<IMAGE_NAME>" alt="<IMAGE_TITLE>" title="click to see the previous image" /></a>
posefius
08-28-2006, 07:25 AM
The comment lines apear in the generated html of all the templates. I think this is a behaviour of PixelPost, but why?
Connie
08-28-2006, 09:00 AM
I will go through this, as I don't use a standard template and my template does not show these...
Connie
08-28-2006, 05:31 PM
Posefius,
what are you telling me?
I installed a fresh version
I switched between templates
no such comments at all
if there is no problem there cannot be any solution ... fortunately (some people have the solution first and then search for the problem :...)
I was at your site and I checked the code
these comments appear in the sourcecode, but are not generated by the image-template.html which you use (I checked it)
I am sure you added some scripts there and the only chance to find it is to deactivate these scripts
you have some mapstats etc.
I know that some scripts hide a lot of links in comments, to present them to search engines etc.
I would de-activate one script after the other and check it out
but I am absolutely sure, it is not Pixelpost at all!
Vernon.Trent
08-28-2006, 07:13 PM
hm... I had a look at your template.
perhaps you do a "clean-up" in your <div id="credits"> and remove all stat and voting tracker. check then your output.
if the commented links are gone, then add one stat/tracker code and check again. repeat the procedure with the others until you see what is causing the "link flood".
the rest of the code looks fine, as far I can see.
Connie
08-28-2006, 07:47 PM
that was just my idea as well
take off scripts and adding one script after the other
take off all Addons and adding one after the other
posefius
08-29-2006, 06:44 AM
Thank you all very much for looking at the problem. Now I know where I have to look at. I never had the idea tracking code could be the problem.
Connie
08-29-2006, 12:35 PM
tell us when you got rid of it, ok?
posefius
08-29-2006, 06:54 PM
I figured out what the problem was. It was the behaviour of the: "Code generator for robot (increase_stats - version 0.1)" addon.
It generated a <a href=image line> for every picture in the database surrounded by comment tags (see the part below), and there are a lot of pictures in my database!!
#============================Additional links============================#
# $increase_rq = "SELECT id, headline, body FROM ".$pixelpost_db_prefix."pixelpost";
# $increase_query = @mysql_query("$increase_rq");
# while ( $ligne = @mysql_fetch_array($increase_query, MYSQL_NUM) )
# {
# $ligne[1] = stripslashes(strip_tags($ligne[1]));
# $ligne[2] = substr(stripslashes(strip_tags($ligne[2])), 0, 200);
# $uris .= "<a href=\"http://".$_SERVER['HTTP_HOST']."/index.php?showimage=$ligne[0]\" title=\"$ligne[1]\">$ligne[2]</a>\r";
# }
# $code .= "<!--\r";
# $code .= "$uris";
# $code .= "-->\r\r";
# $code .= "</body>";
# $tpl = ereg_replace("</body>","$code",$tpl);
#================================================= =======================#
I dont know why it was programmed, so I modified the addon and commented out that part, because this generates a lot of unnecessary coding.
Vernon.Trent
08-29-2006, 07:44 PM
:thumbs up:
thanks for the info :)
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.