 |
 |
 |
 |
 |
| Author |
Message |
echo Newbie


Joined: Aug 09, 2003 Posts: 13
|
Posted: Sat Aug 16, 2003 6:11 am Post subject: Coppermine Photos | eCards Block |
|
|
| 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 |
|
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
VinDSL Site Admin


Joined: Apr 03, 2003 Posts: 68 Location: Arizona (USA) Admin/mod: Disipal Designs Admin/mod: Nuke Cops
|
Posted: Sun Aug 17, 2003 6:01 am Post subject: |
|
|
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?
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 5:17 am; edited 1 time in total |
|
| Back to top |
|
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
echo Newbie


Joined: Aug 09, 2003 Posts: 13
|
Posted: Sun Aug 17, 2003 10:09 am Post subject: |
|
|
Thanks for posting 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 |
|
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
VinDSL 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:27 pm Post subject: |
|
|
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.  |
|
| Back to top |
|
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
VinDSL 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:26 pm Post subject: |
|
|
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  |
|
| Back to top |
|
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
echo Newbie


Joined: Aug 09, 2003 Posts: 13
|
Posted: Sun Aug 17, 2003 10:53 pm Post subject: |
|
|
Great! Thank you. It works perfect now. You are so cool to share Thank you again, echo |
|
| Back to top |
|
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
echo Newbie


Joined: Aug 09, 2003 Posts: 13
|
Posted: Mon Aug 18, 2003 9:59 am Post subject: |
|
|
< LoL! Accidently deleted - VinDSL>  |
|
| Back to top |
|
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
VinDSL Site Admin


Joined: Apr 03, 2003 Posts: 68 Location: Arizona (USA) Admin/mod: Disipal Designs Admin/mod: Nuke Cops
|
Posted: Wed Aug 20, 2003 1:48 am Post subject: |
|
|
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 |
|
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
echo Newbie


Joined: Aug 09, 2003 Posts: 13
|
Posted: Wed Aug 20, 2003 7:34 pm Post subject: |
|
|
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 Thanks,echo |
|
| Back to top |
|
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
VinDSL Site Admin


Joined: Apr 03, 2003 Posts: 68 Location: Arizona (USA) Admin/mod: Disipal Designs Admin/mod: Nuke Cops
|
Posted: Thu Aug 21, 2003 3:15 am Post subject: |
|
|
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 |
|
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
echo Newbie


Joined: Aug 09, 2003 Posts: 13
|
Posted: Thu Aug 21, 2003 3:18 am Post subject: |
|
|
Man do I ever feel stupid All this time I had forgot to upload the JScript that comes with coopermine. Sorry for the troubles Thanks, echo |
|
| Back to top |
|
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
VinDSL Site Admin


Joined: Apr 03, 2003 Posts: 68 Location: Arizona (USA) Admin/mod: Disipal Designs Admin/mod: Nuke Cops
|
Posted: Thu Aug 21, 2003 5:12 am Post subject: |
|
|
| echo wrote: |
Man do I ever feel stupid |
LoL! No problem. Now we're even! _________________ .::Buds not bombs::. |
|
| Back to top |
|
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
WISHMASTER22 Newbie


Joined: Mar 23, 2005 Posts: 1
|
Posted: Tue May 03, 2005 10:58 pm Post subject: error messages |
|
|
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  |
|
| Back to top |
|
|
 |
 |
 |
 |
| |
 |