integrating Viper Guestbook X1 - Page 2 integrating Viper Guestbook X1 - Page 2
 

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

integrating Viper Guestbook X1

Started by Tranz, March 01, 2006, 08:48:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tranz

I'm having trouble following. Does the guestbook work by itself? Could you post a link to the gallery?


Tranz

The problem occurs when the guestbook is standalone: http://familyalbum.gangavalli.com/photos/guestbook/

Since it's not related to the integration itself, I don't know what's going on. You will need to ask the guestbook author at http://www.vipergb.de.vu/

I did a search for the missing table name and didn't see a post on it.

gangavalli

The guestbook is not standalone. I installed using the viper install php file only.
I have asked the guestbook author about the error.
This is the thread: http://www.danskcinders.com/forum/viewtopic.php?t=369
The table exists but there is another problem now. 

after posting the content, there is an error:

The following MySQL query produced an error:
select COMMENTEMAIL, ENTRYSENT from VGB_ADMIN where COMMENTEMAIL != ''

1054: Unknown column 'ENTRYSENT' in 'field list'


how can i sort this?

wuurp

Hmm, this looked really interesting, but neither the support forums or the Viper site to download it are working. Is it gone?

Tranz

Sorry, I should have updated the forum location, which is here: http://www.danskcinders.com/forum/viewforum.php?f=1

I just went to http://www.vipergb.de.vu/ and it worked fine.

wuurp

It works for me too now, but just timed out the past few days.

Thanks for the updated forum link. I had read elsewhere that development had stopped, but I see from the forum it is still active.

wuurp

I had the same troubles as Granis along with other errors. I noticed that you have a mix of short and long php tags, which I dont allow. Also, a few of the files I had to load in wordpad and save as text to remove some extra characters. After that, it seems to be working ok. Thanks for the skin and howto.

wuurp

Hi TranzNDance,

I thought I had this all working and then put off implementing the guestbook until now. But some final testing has revealed a problem with apostrophes. For example, if I type "it's" in the guestbook it becomes it's or in html code, ' replaces the apostrophe instead of '

I don't believe it's the apostrophe problem mentioned in other topics since they work find in titles, etc. Only in the guestbook do I have the problem.

If I run the guestbook as standalone with the standard skin, it works ok, the ' is encoded as ' so it seems like a problem with the skin, or interaction with coppermine.

I checked out the guestbook on your site and saw the same problem. Any ideas on how I can fix this?


Tranz

Yeah, I think it has to do with the guestbook being included in Coppermine. If I use the Standard Skin while included, I have the same issue. Only when using Standard Skin while standalone do I not have the issue. And the issue occurs when the entry gets saved into the database. If I edit the entry in admin panel, the apostrophes are ok.

Looking in include/init.inc.php, I see sanitizing activity:
$HTML_SUBST = array('&' => '&amp;', '"' => '&quot;', '<' => '&lt;', '>' => '&gt;', '%26' => '&amp;', '%22' => '&quot;', '%3C' => '&lt;', '%3E' => '&gt;','%27' => '&#39;', "'" => '&#39;');


I couldn't figure a more clever solution than editing the guestbook index.php file.

FIND:
echo vgb_outText($entry['ENTRY']

REPLACE with:
echo html_entity_decode(vgb_outText($entry['ENTRY']));

My guestbook looks so much neater now. :D

Thanks for reporting the problem and providing some troubleshooting info. I've heard about this before but didn't know where to begin looking. Plus, I was in code mode today.

wuurp

Glad I could help, but I still have problems. I guess you're still using X1.0 since I don't have that code in my index.php. That's from the EntryText function? That's the only place I found similar code. In 1.1 and 1.2RC1 it looks like
  function EntryText() {
    // prints the text of the current entry
    global $entry,$vgbcache;

    $t = ($vgbcache) ? vgb_emofix($entry['ENTRY']) : vgb_outText($entry['ENTRY']);
    echo "<span class='vgbtext'>".$t."</span>";
  }


Your change only cleans up the output right, not what goes into the database?

Tranz

Try this:
  function EntryText() {
    // prints the text of the current entry
    global $entry,$vgbcache;

    $t = ($vgbcache) ? vgb_emofix($entry['ENTRY']) : vgb_outText($entry['ENTRY']);
    $t = html_entity_decode($t);
    echo "<span class='vgbtext'>".$t."</span>";
  }


Yes, it will only clean up the output, since the input is being sanitized for security purposes.

wuurp

That works, but not if I preview the comment. I mean the preview part looks ok, but in the comment entry box it again has the &amp;#39 so if I then submit the comment, it is messed up.

:-\

Tranz

Sorry, I should have tested with preview.

I don't know if your version has this code, but search for it or similar:
    out("<textarea name='".PFIX."TEXT' $inTag>");
    if (isset($_entry['ENTRY']))
      echo vgb_formdata($_entry['ENTRY']);
    echo "</textarea>";


It is in function FormText() in index.php

Change:
echo vgb_formdata($_entry['ENTRY']);

to:
echo html_entity_decode(vgb_formdata($_entry['ENTRY']));

wuurp


piterve

Quote from: Granis on June 01, 2006, 07:56:08 PM
I'm using cpg1.4 and ViperX1..

Whitout the CoppermineX1 theme, the guestbook works fine.. But with the theme switched on, there is no entrys or anyway to make one.

Have a look.

http://granis.bounceme.net/cpg146/guestbook.php

   Pardon my very bad english. Coppermine Skin  Revision: X1.0 downloaded of http://www.vipergb.de.vu/ is missing 7 archives, compared with the standard skin:
contentFrame.php, displayFrameset.php, mainFrameset.php, menuframe.php, screencss.php, selectFrame.php and skincss.php.

   To recover the error download the Standard Skin Revision: X1.1.0 , extract it and copy all archives in the coppermine skin (important: no overwrite the coppermine skin archives !!, take no overwrite to all). Is all, the problem is solved and the visual integration is Ok and the guestbook in now visible.

Thans
Piter

claude258

Quote from: TranzNDance on August 01, 2006, 06:12:07 AM
Sorry, I should have tested with preview.

I don't know if your version has this code, but search for it or similar:
    out("<textarea name='".PFIX."TEXT' $inTag>");
    if (isset($_entry['ENTRY']))
      echo vgb_formdata($_entry['ENTRY']);
    echo "</textarea>";


It is in function FormText() in index.php

Change:
echo vgb_formdata($_entry['ENTRY']);

to:
echo html_entity_decode(vgb_formdata($_entry['ENTRY']));

I also have the same problem with apostrophe and I tried to change the index.php code as you suggested but it doesnt seems work.

link:
http://claudebriere.net/coppermine/guestbook.php

Is there something I dont understand?

For your info, here is the answer about this problem from Marc from Viper forum:
QuoteThat happens if your gb and your MAINSCRIPT are using different encodings. Oviously you fixed it yourself.

Regards,
Marc

Thanks
claude

singaporemall

That's very nice, Now I'll consider installing Viper Guestbook

Singapore Mall
www.singaporemall.in/gallery :)

Tranz

Claude, could you please post the code that you have? Are you sure that when you uploaded the new version overwrote the old?

I don't think you followed all the integration steps. Your guestbook doesn't match the eyeball theme you are using. Here is my guestbook with eyeball: http://takethu.com/guestbook.php?theme=eyeball

claude258

Hi TranzNDance,

I was using the ''standard skin'' in the guestbook setup. It is now switched to "Coppermine X1 skin" but the problem is also there. should it be fixed with your code modification (applied earlier)?

Please note that this problem is only when we write a new message. If we add a comment to a message it is fine.

If you have any comments let me know, I will try to see if I can find the problem.

link:
http://claudebriere.net/coppermine/guestbook.php

Thanks.
Claude