PHP Web Host - Quality Web Hosting For All PHP Applications Clan Themes! We make clans look good!!
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
morpheus_75
Involved
Involved


Joined: Oct 07, 2003
Posts: 302

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

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 Back to top

You could open up the Amazon block and see what makes it tick.
View user's profile Send private message Visit poster's website
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2499

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

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

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum