17 May 2008
Lenon.com
Home Account Forums Downloads Web Links

Coppermine Photos | eCards Block
 
       Lenon.com Forum Index » Blocks     View previous topic :: View next topic  
Author Message
echo
Newbie
Newbie


Joined: Aug 09, 2003
Posts: 13

Posted: Sat Aug 16, 2003 7:11 am    Post subject: Coppermine Photos | eCards Block Reply with quote

Hello, Where can I get the Photos | eCards block with fader you have on this site? If you could provide a link it would be much appreciated. Thanks in advance. echo
Back to top
View user's profile Send private message
Author Message
VinDSL
Site Admin
Site Admin


Joined: Apr 03, 2003
Posts: 68
Location: Arizona (USA) Admin/mod: Disipal Designs Admin/mod: Nuke Cops

Posted: Sun Aug 17, 2003 7:01 am    Post subject: Reply with quote

You're already on that link. That's a mod I did when I installed Coppermine Photo Gallery, in keeping with the BlackW theme. If you want it, you're welcome to it. Nukers gotta stick together, right? Wink

Basically I hacked the 'block-Random_pictures.php' block in Coppermine. I cleaned it up by removing the picture titles, centered things a bit, and added some DHTML Javascript from Dynamic Drive.

Here's the block:

http://download.lenon.com/Random_pictures_hack.zip

I also included the Javascript (.js) file I made for use with this hack. How you impliment this code is up to you. I like to keep my JS seperate from Nuke code as much as possible; makes it easier for me to change the script when I don't have to hunt it down. I call it from an 'include' in my PHP-Nuke 'header.php' file at the bottom of the 'head' function. This is the directive I use:

Code:

include("scripts/gradient.js");



To give you an idea where I place it:

Code:

function head() {
    global $slogan, $sitename, $banners, $nukeurl, $Version_Num, $artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, $adminpage, $userpage, $pagetitle;
    $ThemeSel = get_theme();
    include("themes/$ThemeSel/theme.php");
    echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
    echo "<html>\n";
    echo "<head>\n";
    echo "<title>$sitename $pagetitle</title>\n";

    include("includes/meta.php");
    include("includes/javascript.php");
   
    if (file_exists("themes/$ThemeSel/images/favicon.ico")) {
        echo "<link REL=\"shortcut icon\" HREF=\"themes/$ThemeSel/images/favicon.ico\" TYPE=\"image/x-icon\">\n";
    }
       
    echo "<LINK REL=\"StyleSheet\" HREF=\"themes/$ThemeSel/style/style.css\" TYPE=\"text/css\">\n\n\n";
    include("includes/my_header.php");
    include("scripts/gradient.js");



If you want to read up on how this Javascript works, here's the link:

http://www.dynamicdrive.com/dynamicindex4/image5.htm

That should about do it. It's a simple mod. You shouldn't have any problems. I use the same code in my 'Resources' block BTW. Have fun!


Last edited by VinDSL on Thu Aug 21, 2003 6:17 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Author Message
echo
Newbie
Newbie


Joined: Aug 09, 2003
Posts: 13

Posted: Sun Aug 17, 2003 11:09 am    Post subject: Reply with quote

Thanks for posting Wink however I installed the hack and get a couple warnings on my page, here is what I get:

Warning: head(scripts/gradient.js): failed to open stream: No such file or directory in /home/echo69/public_html/home/header.php on line 48

Warning: head(): Failed opening 'scripts/gradient.js' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/echo69/public_html/home/header.php on line 48

Now do I need the "Random Pictures block also? I tried it with it and then just your hack,both with the same results. Heres what my header.php looks like without adding the js to it:


<?php

/************************************************************************/
/* PHP-NUKE: Advanced Content Management System */
/* ============================================ */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* 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. */
/************************************************************************/

if (eregi("header.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}

require_once("mainfile.php");

##################################################
# Include some common header for HTML generation #
##################################################

$header = 1;

function head() {
global $slogan, $sitename, $banners, $nukeurl, $Version_Num, $artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, $adminpage, $userpage, $pagetitle;
$ThemeSel = get_theme();
include("themes/$ThemeSel/theme.php");
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
echo "<html>\n";
echo "<head>\n";
echo "<title>$sitename $pagetitle</title>\n";

include("includes/meta.php");
include("includes/javascript.php");

if (file_exists("themes/$ThemeSel/images/favicon.ico")) {
echo "<link REL=\"shortcut icon\" HREF=\"themes/$ThemeSel/images/favicon.ico\" TYPE=\"image/x-icon\">\n";
}

echo "<LINK REL=\"StyleSheet\" HREF=\"themes/$ThemeSel/style/style.css\" TYPE=\"text/css\">\n\n\n";
include("includes/my_header.php");
echo "\n\n\n</head>\n\n";
themeheader();
}

online();
head();
include("includes/counter.php");
global $home;
if ($home == 1) {
message_box();
blocks(Center);
}

?>

I put the "include" line like this:

echo "<LINK REL=\"StyleSheet\" HREF=\"themes/$ThemeSel/style/style.css\" TYPE=\"text/css\">\n\n\n";
include("includes/my_header.php");
include("scripts/gradient.js");
echo "\n\n\n</head>\n\n";
themeheader();

But this doesn't work, help? Thanks, echo
Back to top
View user's profile Send private message
Author Message
VinDSL
Site Admin
Site Admin


Joined: Apr 03, 2003
Posts: 68
Location: Arizona (USA) Admin/mod: Disipal Designs Admin/mod: Nuke Cops

Posted: Sun Aug 17, 2003 8:27 pm    Post subject: Reply with quote

I put all my Javascript (.js) files in a directory called 'scripts. In your case it looks like the path would be: /home/echo69/public_html/home/scripts/

So, either make a directory called /scripts/ and put 'gradient.js' in there, or if you just want to put 'gradient.js' in your root director, change the include directive to read:

Code:

include("gradient.js");



...instead of:

Code:

include("scripts/gradient.js");



Sorry about that. If I was releasing this hack to the public, I would have put a README file in the package explaining all that or at least put that path in the ZIP file. Embarassed
Back to top
View user's profile Send private message Visit poster's website
Author Message
VinDSL
Site Admin
Site Admin


Joined: Apr 03, 2003
Posts: 68
Location: Arizona (USA) Admin/mod: Disipal Designs Admin/mod: Nuke Cops

Posted: Sun Aug 17, 2003 9:26 pm    Post subject: Reply with quote

Okay, echo, I redid the ZIP file. Try downloading it again and see if it makes sense now. It hard to be objective about these things. If it looks okay, I'll put it in the download section.

Here's the block again:

http://download.lenon.com/Random_pictures_hack.zip

You taught me something here --- don't be lazy and never assume. I should have done it right the first time Wink
Back to top
View user's profile Send private message Visit poster's website
Author Message
echo
Newbie
Newbie


Joined: Aug 09, 2003
Posts: 13

Posted: Sun Aug 17, 2003 11:53 pm    Post subject: Reply with quote

Great! Thank you. It works perfect now. You are so cool to share Wink Thank you again, echo
Back to top
View user's profile Send private message
Author Message
echo
Newbie
Newbie


Joined: Aug 09, 2003
Posts: 13

Posted: Mon Aug 18, 2003 10:59 am    Post subject: Reply with quote

< LoL! Accidently deleted - VinDSL> Embarassed
Back to top
View user's profile Send private message
Author Message
VinDSL
Site Admin
Site Admin


Joined: Apr 03, 2003
Posts: 68
Location: Arizona (USA) Admin/mod: Disipal Designs Admin/mod: Nuke Cops

Posted: Wed Aug 20, 2003 2:48 am    Post subject: Reply with quote

I'm not sure I understand your last comment. The one is accidently erased. Doh!

When I click the' thumbnail' in the block, it goes to Coppermine and displays the 'intermediate' picture. Then, when I click on the 'intermediate' picture, a window opens up and displays the original picture. Is the last step what you're saying isn't working now?

Just to make sure, I checked the hack against the original block and there wasn't anything done to it that should effect Coppermine itself.
Back to top
View user's profile Send private message Visit poster's website
Author Message
echo
Newbie
Newbie


Joined: Aug 09, 2003
Posts: 13

Posted: Wed Aug 20, 2003 8:34 pm    Post subject: Reply with quote

Yes, its the last step thats not working,the one that shows the original picture when you click on it. (Its all good anyway, it still works) My post got deleted? lol, stuff happens I guess Wink Thanks,echo
Back to top
View user's profile Send private message
Author Message
VinDSL
Site Admin
Site Admin


Joined: Apr 03, 2003
Posts: 68
Location: Arizona (USA) Admin/mod: Disipal Designs Admin/mod: Nuke Cops

Posted: Thu Aug 21, 2003 4:15 am    Post subject: Reply with quote

Sorry about deleting the message. I was tired and the edit button is right next to the quote button, you know? So, I edited it by mistake. LoL! I didn't even notice what I did 'til the next day.

Anyway, was the 'stretch' working before the hack and not afterwards?
Back to top
View user's profile Send private message Visit poster's website
Author Message
echo
Newbie
Newbie


Joined: Aug 09, 2003
Posts: 13

Posted: Thu Aug 21, 2003 4:18 am    Post subject: Reply with quote

Man do I ever feel stupid Embarassed All this time I had forgot to upload the JScript that comes with coopermine. Sorry for the troubles Confused Thanks, echo
Back to top
View user's profile Send private message
Author Message
VinDSL
Site Admin
Site Admin


Joined: Apr 03, 2003
Posts: 68
Location: Arizona (USA) Admin/mod: Disipal Designs Admin/mod: Nuke Cops

Posted: Thu Aug 21, 2003 6:12 am    Post subject: Reply with quote

echo wrote:
Man do I ever feel stupid Embarassed

LoL! No problem. Now we're even!
_________________
.::Buds not bombs::.
Back to top
View user's profile Send private message Visit poster's website
Author Message
WISHMASTER22
Newbie
Newbie


Joined: Mar 23, 2005
Posts: 1

Posted: Tue May 03, 2005 11:58 pm    Post subject: error messages Reply with quote

I am getting this error message, but the block is active and the gradient seems to work, the pictures are not there and the errors are as follows below.

My coppermine galley is not located in my nuke directory,could this be causing the error?




Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/clikn/public_html/bridger/blocks/block-Random_pictures.php on line 39

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/clikn/public_html/bridger/blocks/block-Random_pictures.php on line 48


Thanks Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
       Lenon.com Forum Index » Blocks All times are GMT - 4 Hours
Page 1 of 1
Jump to:  
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

Powered by phpBB 2.0.19 © 2002, 2007 phpBB Group
FlowControl Forums Theme by Disipal Designs

Copyright © 1996-2008 - Lenon.com - All Rights Reserved.

This Website is Powered by an Enhanced Version of PHP-Nuke
The Most Advanced Content Management System in the World.

Script generation time: 0.6954 seconds  (PHP 99% - MySQL 1%)
Queries: 29 | Views last 5 mins: 222 | Server load: Passable  (2.07)
Disipal Designs