Recent image block isnt working! (im using PHPnuke)
ICANSEEYOU7687
Joined: 2004-11-08
Posts: 4 |
![]() |
Hey yall whats up, first lemme say that i read through the faw and searced and couldnt find anything, so sorry if I did happen to miss something, but im having problems showing the most recent image. Im using PHP nuke and I try and create a block and have it show the most recent image, but its just blank...lemme get some URL's up... http://zoki.mybesthost.com is the main site, You can see the Recent Image block on the bottom left, but as u can see theres not really anything there, now lemme find my glalery URL... http://zoki.mybesthost.com/main/modules/gallery2 (which btw the gallery is working well. but I want it to show the most recent image on the site, and ideas what im doing wrong, I simply go to create block and I put this code in there <?php @readfile('http://zoki.mybesthost.com/main/modules/gallery2/main.php?g2_view=imageblock:External&g2_blocks=recentImage&g2_show=title'); ?>
I believe this is my version information just in cas it will help and thanks for tryin to help me out! |
|
h0bbel
![]()
Joined: 2002-07-28
Posts: 13451 |
![]() |
[moving to G2 forum] |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
Do view-source in your browser for your site's main page and you'll find the <?php @readfile.... thing right in the html.. ie, it is being sent with the html instead of being processed by PHP.. |
|
ICANSEEYOU7687
Joined: 2004-11-08
Posts: 4 |
![]() |
hmm thats wierd, its in a php file, I hope theres a way to fix this, any ideas? |
|
ICANSEEYOU7687
Joined: 2004-11-08
Posts: 4 |
![]() |
well i kinda figured it out, but now it shows the most recent image, but displays it outside the little box, and it says no content availiable at this time. http://zoki.mybesthost.com on the bottom left. I figured i needed to do it as a file not html, sorry im slow, LoL, but i cant figure out why its doing that...any suggestions? |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
G2 generates
"& amp;" (without the space between the & and the amp;) instead of just "&". With "&" it works. Any ideas why? |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
ICANSEEYOU7687, I don't know how PHPnuke blocks work.. the readfile() php function will output the results right when the function is called.. if you want to get the contents in a variable use file_get_contents instead of readfile.. then you can give the content to PHPnuke however it wants it. |
|
Xper
Joined: 2004-11-08
Posts: 3 |
![]() |
ICANSEEYOU7687, it appears you got it working, beside the random image part. I'm a bit lost I'm afraid ... Greetz, |
|
ICANSEEYOU7687
Joined: 2004-11-08
Posts: 4 |
![]() |
well are u using phpnuke? cause thats were my problem was. if so, I created a custom blocked, with this inside <?php if (eregi("block-recent_Image.php", $_SERVER['PHP_SELF'])) { Header("Location: index.php"); die(); } ob_start(); include('http://zoki.mybesthost.com/main/modules/gallery2/main.php?g2_view=imageblock:External&g2_blocks=recentImage&g2_show=title'); $output = ob_get_contents(); ob_end_clean(); $content = $output; ?>
and then i simply loaded it |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
hmm.. you can create a modules/imageblock/templates/ImageBlock.tpl.local and change the maxSize=140 parameter you'll find in there to whatever value you like.. this will affect both external image block and any image block in the G2 sidebar.. |
|