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?

Image full size

Asked Modified Viewed 1,636 times
C
cmedia
C
cmedia 10
  • Junior Member, joined since
  • Contributed 23 posts on the community forums.
  • Started 9 threads in the forums
  • Started this discussions
asked
Junior Member

I have a panel called "random_photo_center_panel" and i need to show original image in the panel, not thumb1 not thumb2 from the photogallery. Here's the code. Can someone help me?

<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright © 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: random_center_photo_panel.php
| Version: 1.0
| Author: jikaka
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }

if (file_exists(INFUSIONS."random_photo_center_panel/locale/".$settings['locale'].".php")) {
   include INFUSIONS."random_photo_center_panel/locale/".$settings['locale'].".php";
} else {
   include INFUSIONS."random_photo_center_panel/locale/English.php";
}

$result=dbquery(
   "SELECT ta.album_id,album_title,photo_id,photo_title,photo_thumb2 FROM ".$db_prefix."photo_albums ta ".
   "JOIN ".$db_prefix."photos USING (album_id) ORDER BY RAND() LIMIT 1"
   );

//opentable($locale['rpc100']);
if (dbrows($result)!= "0") {
   //echo "<br><table width='700' border='0' cellpadding='0' cellspacing='0'><tr>";
   while($data = dbarray($result)) {
      //echo "<td width='1%' align='center' valign='top' class='tbl'>";
      echo "<style> p.pos_rel{position:relative;top:-16px;left:-8px;}</style>";
      echo "<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='side'>";
      echo "<p class='pos_rel'><img src='".PHOTOS."album_".$data['album_id']."/".$data['photo_thumb2']."' width='700' height='150' title='".$data['photo_title']."' alt='".$data['photo_title']."' border='0'></a></p>";
      echo "<br /><a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."'></a>";
      //echo "<br />".$locale['rpc101']."<br /><a href='".BASEDIR."photogallery.php?album_id=".$data['album_id']."' title='".$data['album_title']."'>".$data['album_title']."</a>";
      //echo "</td>";
   }
   //echo "</tr></table>";
} else {
   echo $locale['rpc102'];
}
//closetable();
?>


Or simply tell me what is the path to image full size?
Edited by cmedia on 18-03-2014 12:43,
0 replies

3 posts

C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Here you go...

<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright © 2002 - 2011 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| Filename: random_center_photo_panel.php
| Version: 1.0
| Author: jikaka
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licen... Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }

if (file_exists(INFUSIONS."random_photo_center_panel/locale/".$settings['locale'].".php")) {
   include INFUSIONS."random_photo_center_panel/locale/".$settings['locale'].".php";
} else {
   include INFUSIONS."random_photo_center_panel/locale/English.php";
}

$result=dbquery(
   "SELECT ta.album_id,album_title,photo_id,photo_title,photo_thumb2,photo_filename FROM ".$db_prefix."photo_albums ta ".
   "JOIN ".$db_prefix."photos USING (album_id) ORDER BY RAND() LIMIT 1"
   );

//opentable($locale['rpc100']);
if (dbrows($result)!= "0") {
   //echo "<br><table width='700' border='0' cellpadding='0' cellspacing='0'><tr>";
   while($data = dbarray($result)) {
      //echo "<td width='1%' align='center' valign='top' class='tbl'>";
      echo "<style> p.pos_rel{position:relative;top:-16px;left:-8px;}</style>";
      echo "<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='side'>";
      echo "<p class='pos_rel'><img src='".PHOTOS."album_".$data['album_id']."/".$data['photo_filename']."'  title='".$data['photo_title']."' alt='".$data['photo_title']."' border='0'></a></p>";
      echo "<br /><a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."'></a>";
      //echo "<br />".$locale['rpc101']."<br /><a href='".BASEDIR."photogallery.php?album_id=".$data['album_id']."' title='".$data['album_title']."'>".$data['album_title']."</a>";
      //echo "</td>";
   }
   //echo "</tr></table>";
} else {
   echo $locale['rpc102'];
}
//closetable();
?>
0 replies
C
cmedia
C
cmedia 10
  • Junior Member, joined since
  • Contributed 23 posts on the community forums.
  • Started 9 threads in the forums
  • Started this discussions
answered
Junior Member

Awesome! Thanks!
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Welcome!
0 replies

Category Forum

Panels and Infusions

Labels

None yet

Statistics

  • Views 0 views
  • Posts 3 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

C
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
C
C
cmedia 10
  • Junior Member, joined since
  • Contributed 23 posts on the community forums.
  • Started 9 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet