coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: hooch on September 28, 2004, 08:04:42 PM

Title: include a guestbook?
Post by: hooch on September 28, 2004, 08:04:42 PM
yes i have searched.. ;)

i have tried to include a guestbook in my coppermine album but without success.

i added one button between favourite pictures and search and named it Guestbook, but when i link to the guestbook it opens i whole window and not with the "menu" in the top as I want to..

so is there anyone who has a guestbook mod where only registerd and users that are logged in can write in?

thanks in advance!
Title: Re: include a guestbook?
Post by: Tranz on September 28, 2004, 08:16:59 PM
Please post a link to the gallery. Also, post the code that you modified, including the code for the Favorite and Search buttons.
Title: Re: include a guestbook?
Post by: hooch on September 28, 2004, 09:58:01 PM
i just added this in my themes.php file:
<td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
                                        <td><img name="button1_r1_c1" src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" id="button1_r1_c1" alt="" /></td>
                                        <td background="themes/rainy_day/images/button1_r1_c2.gif">
                                                <a href="{GB_TGT}">{GB_LNK}</a>
                                        </td>

then i added this
   
'{GB_TGT}' => "guestbook.php",
'{GB_LNK}' => $lang_main_menu['gb_lnk'],


and then changed the name in my language file..

so i would be very happy if someone could give me a mod so my guestbook also worked :)

maybe some kind of comment funktion? (i searched and found one general comment thing but it dont work for 1.3, just 1.2..
Title: Re: include a guestbook?
Post by: Tranz on September 28, 2004, 10:51:49 PM
In your language file, under
$lang_main_menu = array(
did you add
  'guestbook_lnk' => 'Guestbook',

If that still doesn't work, please post a link to your gallery. It would help to visualize what's going on. And if registration is required, please post a username/password, too.
Title: Re: include a guestbook?
Post by: hooch on September 29, 2004, 01:20:12 AM
yes i have done that..
but in guestbook.php there is no code accept "Guestbook is coming soon"
isnt it there anything you should include or something to have the menu on top?

but still the main question, a guestbook which uses the username from where im logged in..

thanks in advance
/Gustav
Title: Re: include a guestbook?
Post by: Tranz on September 29, 2004, 01:25:00 AM
Where did you get the guestbook? What menu? I'm not going to ask again for the link.
Title: Re: include a guestbook?
Post by: hooch on September 29, 2004, 04:10:01 AM
when i readed the whole post again i saw that i explained what i wanted bad.

1. i request o guestbook funktion i dont have one yet.. so i asked if anyone knew or could help me write one.. :)

2. I´ve tried to make a page which would "fit" in to the design and still view the menu (log in, register, albums etc) but i cant figure out what code is needed so right now when you click in Gästbok (Guestbook) all CPG disapears and only my guestbook.php shows..

sorry, forgot it in the last post :-[
the adress to my gallery is http://www.***.com

thanks in advance again!! ;)
/Gustav
Title: Re: include a guestbook?
Post by: Tranz on September 29, 2004, 04:20:42 AM
I am currently using Advanced Guestbook (http://www.proxy2.de/scripts.php).

To integrate with the CPG template, use this in the guestbook.php file:
<?php 
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
pageheader('Guestbook');
print 
'<h1>Gallery Guestbook</h1>';
include(
'guestbook/index.php');
?>


For the include line, use the location of the guestbook folder and file. You might have to tweak things around in the guestbook files to get things to look and work the way you want.
Title: Re: include a guestbook?
Post by: hooch on September 29, 2004, 03:12:54 PM
ahh thank you VERY much TranzNDance! now i think i understand how it works with the include menu! :D
..and the guestbook works :)

but one more thing, is it possible to make so you dont have any name options, instead that it takes the name you are logged into on CPG when you write in the guestbook?

thanks!
/Gustav
Title: Re: include a guestbook?
Post by: Tranz on September 29, 2004, 04:35:30 PM
I don't know about that. It could probably be coded somehow. I set up my guestbook to allow anyone to sign it so integration with CPG usernames wasn't important to me. A guestbook should be just that, for guests, regardless of if they are registered. ;)
Title: Re: include a guestbook?
Post by: hooch on September 29, 2004, 05:31:35 PM
hehe ok, thanks anyway! ;)

but if there is someone who got a mod like this or know how to do it i would be VERY happy! ;D

/Gustav
Title: Re: include a guestbook?
Post by: Casper on September 29, 2004, 08:18:33 PM
Perhaps to do this, you should look at the available shout boxes (tag boards) .

I have seen some of these use cookies, and could possibly be made to use the coppermine login.
Title: Re: include a guestbook?
Post by: AuDjuba on November 04, 2004, 12:50:10 PM
I'm very new with php, i've only been working with scripts so far. Been trying to implement the same guestbook on my page -> http://mementos.pt.vu . Followed the steps, but when i get to write the <?php 
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
pageheader('Guestbook');
print 
'<h1>Gallery Guestbook</h1>';
include(
'guestbook/index.php');
?>
part, I get a
QuoteNot in Coppermine...
Fatal error: Call to undefined function: pageheader() in /home/left/jbarcia/public_html/gal/gb/index.php on line 5
so, i removed the pageheader bit, only to make the page enterable, but it still says "Not in Coppermine..." and opens in a new window.

Can anyone help?
Title: Re: include a guestbook?
Post by: theK on November 04, 2004, 10:07:20 PM
Or you can use a simple guestbook called txtShout that you can put on the mainpage. Just put it in 'anycontent.php', and don't forget to set 'anycontent' to be displayed in Config. You can get txtShout from http://txtbox.co.za/ .
Title: Re: include a guestbook?
Post by: kjetilg on November 06, 2004, 10:17:05 PM
Hi People!

I have been trying to integrate Advanced Guestbook, but I have some problems. It's opening the first page without problem. But when i try to open 'sign the guestbook' or 'Administration' it does not open. I put the files in a /guestbook/ directory. I have followed the instructions postet in this thread...

Is there a lot of tweaking I have to do to make it work?

If someone can give me a hand it would be great! Thanks.

BTW here is my link.. http://www.kjetildesigns.com/test/guestbook.php

Kjetil
Title: Re: include a guestbook?
Post by: Joachim Müller on November 07, 2004, 10:49:22 AM
the file http://www.kjetildesigns.com/test/addentry.php is not existing on your server, that's why you get a 404 error message. What's the actual question - this is expected behaviour: links to files that don't exist won't work.
You can not include guestbook scripts that consist of different files, you will have to go for one that has everything within one frontend file. The admin area of guestbook scripts usually requires cookie authentification, which won't work in this case, as cookies can only be handled in the file header, which has already been sent when the guestbook script get's included.

Joachim
Title: Re: include a guestbook?
Post by: gedo on January 09, 2005, 05:10:06 PM
same problem as described above
the page/gallery is at http://galerie-wolf.untergrombach.net
CMG is in the main directory
the Advanced Guestbook is in the folder guestbook

The startpage of the guestbook is found, but there are the wrong links for addentry.php and admin.php
does anybody know how to tell Advanced Guestbook to go into the right folder?

Thanks
Georg
Title: Re: include a guestbook?
Post by: Tranz on January 09, 2005, 08:52:36 PM
You need to create separate pages for each subsequent page you want to use, and include them the same way you include the guestbook index page. You also have to edit the guestbook template to point to the newly created pages.

Using the same code, create pages for addentry, etc.
<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
pageheader('Guestbook');
print 
'<h1>Gallery Guestbook</h1>';
include(
'guestbook/index.php'); //include addentry.php, etc
?>


It's not worth making admin pages fit in with the rest of the site since you're the only one who will see it.
Title: Re: include a guestbook?
Post by: MagicFlight on January 16, 2005, 07:13:00 PM
hello,

I have the same target, i red and again...the different answers  but it doesn't work. i'm sure i have done some bad modifications.

1) i use advanced Guestbook, and it's ok (in a new IE view)  if i use  a link directly on the index.php.

2) i have a guestbook.php in the include folder

guestbook.php code is

<?php
define('IN_COPPERMINE', true);
require('include/init.inc.php');
pageheader('Guestbook');
print '<h1>Gallery Guestbook</h1>';
include('guestbook/index.php');

?>


3) the index.php for the guestbook is in the folder guestbook


4) i have modify the theme.php menu with :

<td class="top_menu_bttn">
<a href="include/guestbook.php" onMouseOver="MM_showHideLayers('Menu1','','hide')">Livre d'OR</a>
</td>


5) When i click on the menu i obtain :

Warning: main(include/init.inc.php): failed to open stream: No such file or directory in /var/www/free.fr/f/0/magicflight/GalerieCoppermine/include/guestbook.php on line 9

Fatal error: main(): Failed opening required 'include/init.inc.php' (include_path='/var/www/free.fr/f/0/magicflight/include:.') in /var/www/free.fr/f/0/magicflight/GalerieCoppermine/include/guestbook.php on line 9



6) the link is http://magicflight.free.fr/GalerieCoppermine/index.php


i'm not a cake in php...please help me.

Thanks
Title: Re: include a guestbook?
Post by: Nibbler on January 17, 2005, 02:59:47 PM
Take guestbook.php out of the includes directory and change the link in your theme.
Title: Re: include a guestbook?
Post by: schloomania on April 06, 2005, 12:36:25 PM
i couldn´t understand the whole introduction ?!  :(
I only installed 'Advanced Guestbook' in include/guestbook

here are my question:

1. How I add a button like 'guestbook' i.g. between 'album-list' and 'favorite pictures'?

2. How I create the site/file guestbook.php?

3. At which position have I to paste the codes in themes.php, my language file and guestbook.php?

I tried much without succeeded  >:(
Title: Re: include a guestbook?
Post by: Tranz on April 06, 2005, 03:29:34 PM
I suggest using Viper Guestbook, which is designed to be includeable. It takes some understanding to include AG.
Title: Re: include a guestbook?
Post by: schloomania on April 06, 2005, 05:28:07 PM
ok... I tried Viper Guestbook... but the only problem I have is that I don´t know how I can include vgb to cpg? ... and how I include in the same style like coppermine (theme is 'hardwired) ?
Maybe TranzNDance  could help me further !?
Title: Re: include a guestbook?
Post by: Tranz on April 06, 2005, 05:39:30 PM
Did you read the instructions on include?

I used the Skeleton skin to use the cpg css style classes. Thing is, I'm not sure if I can share what I've done. Maybe the author allows it for skins. I'll have to check the license. Or ask him when he returns... I think next month.
Title: Re: include a guestbook?
Post by: schloomania on April 06, 2005, 10:52:54 PM
yes, I read the Readme for including the vgb... but I didn´t really understand it :(
Title: Re: include a guestbook?
Post by: schloomania on April 11, 2005, 03:51:40 PM
Quote from: schloomania on April 06, 2005, 12:36:25 PM
i couldn´t understand the whole introduction ?!  :(
I only installed 'Advanced Guestbook' in include/guestbook

here are my question:

1. How I add a button like 'guestbook' i.g. between 'album-list' and 'favorite pictures'?

2. How I create the site/file guestbook.php?

3. At which position have I to paste the codes in themes.php, my language file and guestbook.php?

I tried much without succeeded  >:(

MAYBE SOME HELP, please ?!?
Title: Re: include a guestbook?
Post by: blobnl on May 22, 2005, 02:15:08 PM
Hi in my gallery i added the button to go to my guestbook, but the problem is I want the guestbook to use the same template as the rest of my site..
When i try to go directly to the guestbook.php file i get the following error message:

Warning: Failed opening '/guestbook/index.php' for inclusion (include_path='.;C:\IBserver\php\includes;C:\IBserver\php\pear') in c:\ibserver\www\fotoforum\guestbook.php on line 6

Can anyone tell me what i have to do to make it work with the template my gallery is using?

Blobnl
Title: Re: include a guestbook?
Post by: Tranz on May 22, 2005, 07:11:41 PM
uh, which guestbook are you using and does it support inclusion?
Title: Re: include a guestbook?
Post by: blobnl on May 22, 2005, 07:45:28 PM
i use 'Advanced Guestbook' ....
Title: Re: include a guestbook?
Post by: Tranz on May 22, 2005, 08:15:21 PM
Advanced guestbook does not support inclusion out-the-box unless you have the coding ability to modify the code to do so. Viper guestbook does support inclusion, and I am working on releasing a skin for it that will make it match the gallery template.
Title: Re: include a guestbook?
Post by: blobnl on May 22, 2005, 08:26:06 PM
Looking forward for this release.. till then i will use it like i do now, with the custom skin that comes with the guestbook.

Tnx for your reply!!!
Title: Re: include a guestbook?
Post by: Tranz on June 18, 2005, 05:52:55 PM
The Viper Guestbook skin that inherits the theme from the gallery is available here: http://forum.coppermine-gallery.net/index.php?topic=18738.0