Advanced search  

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]

Pages: [1] 2   Go Down

Author Topic: include a guestbook?  (Read 65920 times)

0 Members and 1 Guest are viewing this topic.

hooch

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
include a guestbook?
« 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!
« Last Edit: September 29, 2004, 04:26:06 pm by Casper »
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: include a guestbook?
« Reply #1 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.
Logged

hooch

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: include a guestbook?
« Reply #2 on: September 28, 2004, 09:58:01 pm »

i just added this in my themes.php file:
Code: [Select]
<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
Code: [Select]
   
'{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..
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: include a guestbook?
« Reply #3 on: September 28, 2004, 10:51:49 pm »

In your language file, under
Code: [Select]
$lang_main_menu = array(did you add
Code: [Select]
  '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.
« Last Edit: September 28, 2004, 11:01:15 pm by TranzNDance »
Logged

hooch

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: include a guestbook?
« Reply #4 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
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: include a guestbook?
« Reply #5 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.
Logged

hooch

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: include a guestbook?
« Reply #6 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
« Last Edit: November 05, 2004, 07:33:41 pm by hooch »
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: include a guestbook?
« Reply #7 on: September 29, 2004, 04:20:42 am »

I am currently using Advanced Guestbook.

To integrate with the CPG template, use this in the guestbook.php file:
Code: [Select]
<?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.
Logged

hooch

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: include a guestbook?
« Reply #8 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
« Last Edit: September 29, 2004, 03:58:19 pm by hooch »
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: include a guestbook?
« Reply #9 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. ;)
Logged

hooch

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: include a guestbook?
« Reply #10 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
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: include a guestbook?
« Reply #11 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.
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: include a guestbook?
« Reply #12 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
Code: [Select]
<?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
Quote
Not 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?
Logged

theK

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: include a guestbook?
« Reply #13 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/ .
Logged

kjetilg

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: include a guestbook?
« Reply #14 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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: include a guestbook?
« Reply #15 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
Logged

gedo

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: include a guestbook?
« Reply #16 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
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: include a guestbook?
« Reply #17 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.
Code: [Select]
<?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.
Logged

MagicFlight

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: include a guestbook?
« Reply #18 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
Logged

Nibbler

  • Guest
Re: include a guestbook?
« Reply #19 on: January 17, 2005, 02:59:47 pm »

Take guestbook.php out of the includes directory and change the link in your theme.
Logged
Pages: [1] 2   Go Up
 

Page created in 0.029 seconds with 20 queries.