Recent image block isnt working! (im using PHPnuke)
ICANSEEYOU7687
Joined: 2004-11-08
Posts: 4 |
Posted: Mon, 2004-11-08 23:59 |
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! |
|
Posts: 13451
[moving to G2 forum]
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..
Posts: 4
hmm thats wierd, its in a php file, I hope theres a way to fix this, any ideas?
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?
Posts: 32509
G2 generates
http://zoki.mybesthost.com/main/modules/gallery2/main.php?g2_view=core:DownloadItem& amp;g2_itemId=12& amp;g2_serialNumber=2
(without the space between the & and the amp;)instead of
http://zoki.mybesthost.com/main/modules/gallery2/main.php?g2_view=core:DownloadItem&g2_itemId=12&g2_serialNumber=2
"& amp;" (without the space between the & and the amp;) instead of just "&".
With "&" it works.
Any ideas why?
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.
Posts: 3
ICANSEEYOU7687, it appears you got it working, beside the random image part.
I'm encountering the same issue and I'm wondering how exactly you fixed it.
You said you changed the block to file and it worked. I know I'm a noob but how did you do that. If I create a new block and put the code:
<?php @readfile('http://www.egoodies.be/nele_php/modules/gallery2/main.php?g2_view=imageblock:External&g2_blocks=randomImage&g2_show=title'); ?>
in it, then it always get saved as a HTML block.
I'm a bit lost I'm afraid ...
Greetz,
Bert
Posts: 4
well are u using phpnuke? cause thats were my problem was. if so, I created a custom blocked, with this inside
and then i simply loaded it
the http://www.karakas-online.de/ phpnuke forums are great, gotta love them! and its the most recent image, not a random image, but I cant find out were u resize the thumb nails, the image is to big for the menu for phpnuke, how can I resise them? can i put it in the code?
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..