How to create sidebar random image?
pligg mods code not work in my site...
pls help this post..
My site
Ta milers.com - Submit News for | lawyer | student loan | data recovery | data recovery | auto insurance | hard drive recovery | reverse mortgage


How to create sidebar random image?
pligg mods code not work in my site...
pls help this post..
My site
Ta milers.com - Submit News for | lawyer | student loan | data recovery | data recovery | auto insurance | hard drive recovery | reverse mortgage
I believe the example code should still work, just make sure that you follow the directions.
The Facebook Module for Pligg CMS!
Register, Login, and Submit Stories with Facebook. An absolute MUST HAVE for all Pligg sites!
<br><!-- Begin Thumbnail Snippet -->
<br><div class="sidebar-top"></div>
<br><div class="sidebar">
<br> <div class="headline">
<br> <div class="sectiontitle">Random Image</div>
<br> </div>
<br> <div class="boxcontent">
<br> <table width="100%" border="0">
<br> {php}
<br> // 200x200 is the thumbnail size to show
<br> // Limit 1 is how many thumbnails to show
<br> $query = "SELECT * FROM pligg_files where file_size = '200x200' ORDER BY RAND() LIMIT 1";
<br> $result = mysql_query($query) or die(mysql_error());
<br> while($row = mysql_fetch_array($result)){
<br> echo '<tr><td align="center">';
<br> echo "<a href="story.php?id=".$row[file_link_id].""><img src="./modules/upload/attachments/thumbs/".$row[file_name]."" /></a>";
<br> echo "</td></tr>";
<br> }
<br> {/php}
<br> </table>
<br> </div>
<br></div>
<br><!-- End Thumbnail Snippet -->
<br>
Nellai i think this code your using
wat thumbnail size your using ??
check your thumbnail size and modify code above code used 200x200
if your using 200x200 then its work otherwise its not work
Hello nellaitamil,
I modify the script. it should work i have tested it.
just change the "?" in( SELECT * FROM (?files) where file_size ) with your prefix and remove the ()PHP Code:<!-- Begin Thumbnail Snippet -->
<div class="sidebar-top"></div>
<div class="sidebar">
<div class="headline">
<div class="sectiontitle">Random Image</div>
</div>
<div class="boxcontent">
<table width="100%" border="0">
{php}
$query = "SELECT * FROM (?files) where file_size = '200x200' ORDER BY RAND() LIMIT 4";
$result = mysql_query($query);
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
printf ('<tr><td align="center">');
printf ('<a href="story.php?id=%s"><img src="./modules/upload/attachments/thumbs/%s" border="0">',$row["file_link_id"],$row["file_name"])</a>;
printf ('</td></tr>');
}
{/php}
</table>
</div>
</div>
<!-- End Thumbnail Snippet -->
Go to your confi in your pligg admin panel and go straight to MySQL Table Prefix and next to value tell me what it you have?