Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...
Author Message
morpheus_75
Involved
Involved


Joined: Oct 07, 2003
Posts: 302

PostPosted: Tue Jun 08, 2004 3:42 am Reply with quote

I'm looking for a block displaying random images from My_eGallery. I found one which displays the last added images, but it is not exactly what I'm looking for. Can u help me?
 
View user's profile Send private message
GanjaUK
Life Cycles Becoming CPU Cycles


Joined: Feb 14, 2004
Posts: 633
Location: England

PostPosted: Tue Jun 08, 2004 7:41 am Reply with quote

You could open up the Amazon block and see what makes it tick.

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2496

PostPosted: Tue Jun 08, 2004 2:51 pm Reply with quote

If you dig I think chatservs still one at nukeresources in the downloads but I didn't check to see if its still there or not...

Actually I found one from nuke6.0 on my test server.
Code:


<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2001 by Idefix                                         */
/* http://www.Nukedownload.com                                          */
/* Modified for MeG 2.7.9 by Manuel Beer (webmaster@scandal.de)         */
/* URL: Http://www.scandal.de   Please Inform me before changing        */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
/************************************************************************/
/* Filename: Block randompic                                            */
/* Original  Author:Idefix                                              */
/* Tested With PHP NUKE 5.2 and MEG 2.7.4  and 2.7.9                    */
/************************************************************************/


if (eregi("block-randompic.php",$PHP_SELF)) {
    Header("Location: index.php");
    die();
}

$blocks_modules[randompic] = array(
    'title' => "randompic",
    'func_display' => 'randompic',
    'func_add' => '',
    'func_update' => '',
    'text_type' => 'randompic',
    'text_type_long' => '',
    'text_content' => "randompic",
    'support_nukecode' => false,
    'allow_create' => false,
    'allow_delete' => false,
    'form_url' => false,
    'form_content' => false,
    'form_refresh' => false
);

        global $user, $prefix;

        include 'admin/modules/gallery/config.php';
        mt_srand((double)microtime()*1000000);
        if (is_user($user))
                $total = mysql_fetch_array(mysql_query("SELECT COUNT(p.pid) AS total FROM $prefix"._gallery_pictures." AS p LEFT JOIN $prefix"._gallery_categories." AS c ON c.gallid=p.gid WHERE c.visible>=1"));
        else
                $total = mysql_fetch_array(mysql_query("SELECT COUNT(p.pid) AS total FROM $prefix"._gallery_pictures." AS p LEFT JOIN $prefix"._gallery_categories." AS c ON c.gallid=p.gid WHERE c.visible>=2"));

        $p = mt_rand(0,($total[total] - 1));

        $pic = mysql_fetch_array(mysql_query("SELECT p.pid, p.img, p.name, p.description, c.galloc FROM $prefix"._gallery_pictures." AS p LEFT JOIN $prefix"._gallery_categories." AS c ON c.gallid=p.gid LIMIT $p,1"));

        $pic[description] = htmlentities($pic[description]);

        if (file_exists("$gallerypath/$pic[galloc]/$pic[img]"))
                $content = "<center><a href=\"$baseurl&amp;do=showpic&amp;pid=$pic[pid]\"><img src=\"$gallerypath/$pic[galloc]/$pic[img]\" width=\"120\" border=\"0\" alt=\"$pic[description]\"><br><font size=\"1\">$pic[name]</font></a></center>";
        else
                $content = "<center><a href=\"$baseurl&amp;do=showpic&amp;pid=$pic[pid]\"><img src=\"$gallerypath/$pic[galloc]/$pic[img]\" width=\"120\" border=\"0\" alt=\"$pic[description]\"><br><font size=\"1\">$pic[name]</font></a></center>";

?>


Might have to update it to run if you don't have the old compatability lines in mainfile still.
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©