Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Random photo panel in 6.01.1 malfunction

Asked Modified Viewed 2,093 times
E
Espectro
E
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
asked
Newbie

hi all

I just upgraded to 6.01.1, and very nice work lads, I have really looked forward to the rating stuff for the photogallery, and my site is alot faster now. I have one problem though, i am using the "random photo" panel (on the right side of my site), and now it doesnt show any thumbnail anymore :(

Could anyone help me? Thanks (im a noob at programming).

My site is http://www.armedassault.eu
Thanks again
Espectro
0 replies

8 posts

Q
Quartzkyte
Q
www.php-fusion.co.uk/../../images/smiley/cool.gif

Mike
---------------------------------------
Quartzkyte, admin @ French N.S.S.
  • Senior Member, joined since
  • Contributed 404 posts on the community forums.
  • Started 40 threads in the forums
answered
Senior Member

It would be a good idea to do some searching...
http://www.php-fusion.co.uk/forum/vie...owstart=60
0 replies
E
Espectro
E
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
answered
Newbie

lol, sorry about that, just saw it myself.

Anyway, I found the solution in that thread you linked to. For those who stumble across this thread:

1. Create a new Panel, named whatever you want :)
2. Copy and paste this code into the panel (deleting anything thats allready in it. This is the ONLY thing that is supposed to be in the panel:

$result=dbquery(
"SELECT ta.album_id,album_title,photo_id,photo_title,photo_thumb1 FROM ".$db_prefix."photo_albums ta ".
"JOIN ".$db_prefix."photos USING (album_id) ORDER BY RAND() LIMIT 1"
);
if(dbrows($result)==1){
@opensidex("Random Photo");
$data=dbarray($result);
$filename=PHOTOS.$data['photo_id'].'t.jpg';
if(!file_exists($filename)) $filename=$image_url.'/imagenotfound.jpg';
echo "<center>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".PHOTOS."".$data['photo_thumb1']."' width='100' height='75'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."'>".$data['photo_title']."</a>
<br>
".$data['album_title']."
</center>";
@closesidex();
}


//Edit, disabled smileys
Edited by Espectro on 14-06-2006 20:45,
0 replies
K
Ken
K
Ken 10
No Support by PM. Please use the forum.
  • Senior Member, joined since
  • Contributed 713 posts on the community forums.
  • Started 43 threads in the forums
answered
Senior Member

From page 3 on the link above:

Quote

Paulsson wrote:

Non folder version: (safemode on)

 $result=dbquery(
"SELECT ta.album_id,album_title,photo_id,photo_title,photo_thumb1 FROM ".$db_prefix."photo_albums ta ".
"JOIN ".$db_prefix."photos USING (album_id) ORDER BY RAND() LIMIT 1"
);
if(dbrows($result)==1){
@opensidex("Random Photo");
$data=dbarray($result);
$filename=PHOTOS.$data['photo_id'].'t.jpg';
if(!file_exists($filename)) $filename=$image_url.'/imagenotfound.jpg';
echo "<center>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".PHOTOS."".$data['photo_thumb1']."' width='".$settings['thumb_w']."' height='".$settings['thumb_h']."'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."'>".$data['photo_title']."</a>
<br>
<a href='".BASEDIR."photogallery.php?album_id=".$data['album_id']."'>".$data['album_title']."
</center></a>";
@closesidex();
}


Folder version: (safemode off)

$result=dbquery(
"SELECT ta.album_id,album_title,photo_id,photo_title,photo_thumb1 FROM ".$db_prefix."photo_albums ta ".
"JOIN ".$db_prefix."photos USING (album_id) ORDER BY RAND() LIMIT 1"
);
if(dbrows($result)==1){
@opensidex("Random Photo");
$data=dbarray($result);
$filename=PHOTOS.$data['photo_id'].'t.jpg';
if(!file_exists($filename)) $filename=$image_url.'/imagenotfound.jpg';
echo "<center>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".PHOTOS."album_".$data['album_id']."/".$data['photo_thumb1']."' width='".$settings['thumb_w']."' height='".$settings['thumb_h']."'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."'>".$data['photo_title']."</a>
<br>
<a href='".BASEDIR."photogallery.php?album_id=".$data['album_id']."'>".$data['album_title']."
</center></a>";
@closesidex();
}
Edited by Ken on 14-06-2006 20:48,
0 replies
R
Raskolnikov
R
promote.opera.com/small/opera94x15.gif
  • Member, joined since
  • Contributed 71 posts on the community forums.
  • Started 8 threads in the forums
answered
Member

What does safemode mean? And how do we know which we are using?
0 replies
S
starefossen
S
www.postexus.com - Follow Postexus on Facebook.
  • Senior Member, joined since
  • Contributed 359 posts on the community forums.
  • Started 20 threads in the forums
answered
Senior Member

Ask your host about it, they know it...
0 replies
K
Ken
K
Ken 10
No Support by PM. Please use the forum.
  • Senior Member, joined since
  • Contributed 713 posts on the community forums.
  • Started 43 threads in the forums
answered
Senior Member

Quote

Raskolnikov wrote:
What does safemode mean? And how do we know which we are using?


Put the following code in a Custom Page and click "Preview" (you can also save it for later use):


<?php
if (ini_get ( "safe_mode" ))
{
  echo "SafeMode On";
}
else
{
  echo "SafeMode Off";
}
?>


This could maybe be added to the Admin Panel somewhere, so all could just go to Admin Panel an see.
Edited by Ken on 14-06-2006 21:54,
0 replies
N
NikonForum
N
  • Junior Member, joined since
  • Contributed 22 posts on the community forums.
  • Started 1 thread in the forums
answered
Junior Member

Works like a charm !
Thanks Paulsson !
0 replies
R
Raskolnikov
R
promote.opera.com/small/opera94x15.gif
  • Member, joined since
  • Contributed 71 posts on the community forums.
  • Started 8 threads in the forums
answered
Member

Quote

Ken wrote:

Quote

Raskolnikov wrote:
What does safemode mean? And how do we know which we are using?


Put the following code in a Custom Page and click "Preview" (you can also save it for later use):


<?php
if (ini_get ( "safe_mode" ))
{
  echo "SafeMode On";
}
else
{
  echo "SafeMode Off";
}
?>


This could maybe be added to the Admin Panel somewhere, so all could just go to Admin Panel an see.


Cool! I guess safemode is Off for me.

Is that good or bad?
0 replies

Category Forum

Bugs and Errors - 6

Labels

None yet

Statistics

  • Views 0 views
  • Posts 8 posts
  • Votes 0 votes
  • Topic users 6 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet