include a guestbook? include a guestbook?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

include a guestbook?

Started by hooch, September 28, 2004, 08:04:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hooch

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!

Tranz

Please post a link to the gallery. Also, post the code that you modified, including the code for the Favorite and Search buttons.

hooch

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..

Tranz

#3
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.

hooch

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

Tranz

Where did you get the guestbook? What menu? I'm not going to ask again for the link.

hooch

#6
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

Tranz

I am currently using Advanced Guestbook.

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.

hooch

#8
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

Tranz

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. ;)

hooch

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

Casper

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.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

AuDjuba

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?

theK

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/ .

kjetilg

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

Joachim Müller

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

gedo

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

Tranz

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.

MagicFlight

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

Nibbler

Take guestbook.php out of the includes directory and change the link in your theme.