|
Create a FREE account or Login
|
|
As a guest, you don't have access to our FULL navigation system. |
|
|
PHPNuke Blocks IMPROVED Random Block
Posted on Friday, April 18, 2003 @ 18:54:49 CDT This block has been superceded by this one.
|
| | |
Average Score: 4.96 Votes: 62

|
|
Re: IMPROVED Random Block (Score: 1) by slackbladder on Sunday, April 20, 2003 @ 08:43:24 CDT (User Info | Send a Message) http://www.esp3.net |
$url .= "&op=modload&name=gallery&file=index&include=view_photo.php";
$albumURL .= "&op=modload&name=gallery&file=index&include=view_album.php";
I maybe wrong but I found these lines of code in random_support.php not block-random.php. |
|
Re: IMPROVED Random Block (Score: 1) by Daniel on Tuesday, April 22, 2003 @ 02:38:11 CDT (User Info | Send a Message) | | The fact that I would have to edit every php file with those changes is ridiculous and not even worth the time to have a random photo. |
|
Re: IMPROVED Random Block (Score: 1) by dari on Tuesday, April 22, 2003 @ 08:47:37 CDT (User Info | Send a Message) http://www.themolavis.com/ | | You do not have to edit every one of those files. I have provided the files, with the edits already made, in the download section of this website. The only edits you make are to the block-random.php and random-support.php files to reflect the gallery directory of your installation and the name of your gallery. |
|
Re: IMPROVED Random Block (Score: 1) by dwellersire on Wednesday, April 23, 2003 @ 16:38:29 CDT (User Info | Send a Message) http://darkexodus.com | So far works great! Should save some bandwidth from the last random block that changed every refresh.
What I'd really like however, is for a block that didn't display images that were hidden, or have permissions that only logged in users can see. |
|
Re: IMPROVED Random Block (Score: 1) by dari on Wednesday, April 23, 2003 @ 20:35:59 CDT (User Info | Send a Message) http://www.themolavis.com/ | yeah, i've gotta figure out the exact code to exclude hidden albums and/or albums based on permissions. i'm pretty sure i know what needs to get done code-wise, i just have to dig up the time to figure it out.
right now i'm working on porting the CNN RSS script to PHP, and on a cookie-based gallery update block (depending on who you are and when you last visited, it displays the galleries that were updated in the interim). a lot of projects, not a lot of time :) |
|
Re: IMPROVED Random Block (Score: 1) by mokum on Saturday, May 10, 2003 @ 14:28:12 CDT (User Info | Send a Message) | Hi there!
Wonderfull block, worked like a charm -after- I read the forum ;)
Might be a good idea to add the installation instructions in a readme?
Anyway: works like a charm. Thanks for the good work.
Mokum
See it at http://www.zirkusprojekt-theodor.ch |
|
Re: IMPROVED Random Block (Score: 1) by adamsjd on Wednesday, May 14, 2003 @ 02:46:53 CDT (User Info | Send a Message) | I just had to make a few mods to the code to make it work with mod_rewrite rathe than in nuke. Also had to put a echo $content; at the end of block-random.php.
I think the hidden photos not being included in the random is a huge issue for me... also if I want to place multiple instances of the code on a page (with HOURLY setting) is there an easier way than copying the code to use differn't cache files? |
|
Re: IMPROVED Random Block (Score: 1) by adamsjd on Wednesday, May 14, 2003 @ 03:19:56 CDT (User Info | Send a Message) | | Now that I look at it this script causes my apache 1.3.27 to skyrocket in mem usage. I assume its is the searching that results in my httpd process to go up to 70mb rather than its usual sub 15mb. Looks like I'll be sticking with my custom cronjob find./ -name script to output my random code.... |
|
Re: IMPROVED Random Block (Score: 1) by dari on Wednesday, May 14, 2003 @ 08:49:18 CDT (User Info | Send a Message) http://www.themolavis.com/ | | hmm..my apache isn't grabbing gobs of memory as a result of this block (and i'm running 3 of the blocks on my site). .shrug |
|
Re: IMPROVED Random Block (Score: 1) by kidhop on Wednesday, May 21, 2003 @ 02:19:59 CDT (User Info | Send a Message) | I've had trouble with trying to get 1.3.3 running with the random block even with the updated files so I decided to upgrade to 1.3.4. After using the update files from this site I get a different error.
Fatal error: Call to undefined function: checkifonlineoroffline() in *******htmlmodulesgalleryinit.php on line 101
Does anybody have any suggestions??? |
|
Re: IMPROVED Random Block (Score: 1) by smooow on Friday, May 23, 2003 @ 07:32:10 CDT (User Info | Send a Message) | hi there have just updated my site to 6.5 and my gallery to the same as the one you are running. in the hope of getting a random block to work :) all the updates went fine. but when i try and run the block on my site it giveing me this in reply?
Fatal error: Failed opening required '/home/s/y/syncortex/public_html/html/modules/galleryinit.php' (include_path='') in /home/s/y/syncortex/public_html/html/blocks/block-randomwee.php on line 29
any pointers as to where im going wrong thanks :) |
|
Re: IMPROVED Random Block (Score: 1) by iliusha on Monday, May 26, 2003 @ 15:00:41 CDT (User Info | Send a Message) | hi, guys!
I receive such mistakes:
Warning: rand() expects parameter 2 to be long, string given in /home/........../............../modules/gallery/random_support.php on line 203
ERROR: requested index [] out of bounds [16]
Fatal error: Call to a member function on a non-object in /home/................/................/modules/gallery/classes/Album.php on line 642
What i need to do? Help me, please!
|
|
Re: IMPROVED Random Block (Score: 1) by luggage on Wednesday, July 23, 2003 @ 21:15:26 CDT (User Info | Send a Message) | I had a problem with installing the new improved version from scratch. Had to add...
else
{
$rebuild = 1;
}
on the end of the if in get_random_photo_id
so it would rebuild the cache if there wasn't one there.
Was this correct? It got it working but I've never used php before so wasn't sure.
Thanks
Scott |
|
Re: IMPROVED Random Block (Score: 1) by nukestud on Friday, August 01, 2003 @ 21:57:41 CDT (User Info | Send a Message) | I followed everything step by step and no matter what I do I cannot get rid of the error
Warning: fopen(/block-random.cache) [function.fopen]: failed to create stream: Permission denied
It works tho, this is what I don't understand so why is it out putting that damn error!!! If I could comment out the error everything would work fine! Very frustrating :( |
|
| 
|
|
|