Home Private Messages Search
CPG Dragonfly™ CMS stopsoftwarepatents.eu petition banner
Toggle Content
 
Forums ⇒ DragonflyCMS ⇒ Add-Ons & Blocks ⇒ Plogger Image Gallery Integration


Plogger Image Gallery Integration
Need help creating a block or add-on, or you have created or modified a block/add-on that works in Dragonfly CMS and it meets the CPG Security Requirements? Do you have feedback about a specific add-on? Here is the place to post. Read the announcements here first!.
Go to page 1, 2  Next
Post new topic    Reply to topic    Printer Friendly Page     Forum Index ⇒  Add-Ons & Blocks

View previous topic :: View next topic  
Author Message
keekwai
Nice poster
Nice poster

Offline Offline
Joined: Apr 01, 2008
Posts: 50
Location: Thailand
PostPosted: Fri Jul 08, 2011 3:11 pm
Post subject: Plogger Image Gallery Integration

I,ve installed Plogger on my server and temporarily have it fetched into an iFrame in an empty module index.php file.

Link .. ajarnmark.com/gallery.html

I have Plogger installed in a folder in my root directory called "gallery"

DF is also installed in the root.

It works OK ... but I'd rather do it the way Plogger wants me to ... but I have no idea how to insert their script. Here are the instructions.

Code::
To integrate Plogger into your website, place the following PHP statements in the .php
file you wish display the gallery in:

First line of the .php file ->										
<?php require("plogger.php"); ?>

In the HEAD section ->												
<?php the_plogger_head(); ?>

In the BODY section where you want the gallery -
<?php the_plogger_gallery(); ?>

N.B "plogger.php" is in root/gallery/plogger.php

Is there a way to insert that into a module index.php or maybe a Content page?

_________________
Ajarnmark

keekwai's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
XP/Apache 2.0/MySQL5.0.77/Dragonfly9.2.1
Back to top
View user's profile Visit poster's website
Kendle
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Dec 16, 2004
Posts: 552

PostPosted: Fri Jul 08, 2011 3:51 pm
Post subject: Re: Plogger Image Gallery Integration

In your empty module index.php file ...

Code::
if (!defined('CPG_NUKE')) { exit; }
require("gallery/plogger.php");
global $modheader;
ob_start();
the_plogger_head();
$modheader .= ob_get_contents();
ob_end_clean();
require('header.php');
the_plogger_gallery();

possibly ... dunno, try it Wink

_________________
Gaming League / Cup - www.leaguecms.co.uk :: Other DragonFly modules - www.cmsdreams.co.uk

Kendle's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
keekwai
Nice poster
Nice poster

Offline Offline
Joined: Apr 01, 2008
Posts: 50
Location: Thailand
PostPosted: Fri Jul 08, 2011 4:11 pm
Post subject: Re: Plogger Image Gallery Integration

No. That doesn't work. I get this error
Code::
Fatal error: Call to undefined function OpenTable() in /home/ajarnmar/public_html/includes/cmsinit.inc on line 710

This is the state of th index.php so far.

Code::
<?php
/**
* CPG Dragonfly CMS
* Copyright © 2004 - 2006 by CPG-Nuke Dev Team, dragonflycms.org
* Released under the GNU GPL version 2 or any later version
* $Id: index.php,v 1.4 2006/10/07 07:54:11 nanocaiordo Exp $
*/

// protect against direct access
if (!defined('CPG_NUKE')) { exit; }
require("gallery/plogger.php");
global $modheader;
ob_start();
the_plogger_head();
$modheader .= ob_get_contents();
ob_end_clean();
require('header.php');
the_plogger_gallery();

// close the table that we have created

// there isn't any need to include the footer, as the index page handles this already
// require('footer.php');

_________________
Ajarnmark

keekwai's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
XP/Apache 2.0/MySQL5.0.77/Dragonfly9.2.1
Back to top
View user's profile Visit poster's website
Kendle
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Dec 16, 2004
Posts: 552

PostPosted: Fri Jul 08, 2011 5:00 pm
Post subject: Re: Plogger Image Gallery Integration

Line 710 of cmsinit.inc is within the cpg_error() function, so something went wrong but it fell over trying to tell you what it was, which isn't very helpful.

Maybe, temporaily, comment out line 710 in cmsinit.inc so at least you get to see the real error message before it falls over.

_________________
Gaming League / Cup - www.leaguecms.co.uk :: Other DragonFly modules - www.cmsdreams.co.uk

Kendle's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
keekwai
Nice poster
Nice poster

Offline Offline
Joined: Apr 01, 2008
Posts: 50
Location: Thailand
PostPosted: Fri Jul 08, 2011 5:49 pm
Post subject: Re: Plogger Image Gallery Integration

No go there .. just an error about the line being commented out and a database error

Code::
A database error has occurred

The webmaster has been notified of the error

[ Home ] [ Go Back ]

Fatal error: Call to undefined function CloseTable() in /home/ajarnmar/public_html/includes/cmsinit.inc on line 714

_________________
Ajarnmark

keekwai's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
XP/Apache 2.0/MySQL5.0.77/Dragonfly9.2.1
Back to top
View user's profile Visit poster's website
Kendle
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Dec 16, 2004
Posts: 552

PostPosted: Fri Jul 08, 2011 6:07 pm
Post subject: Re: Plogger Image Gallery Integration

Hopefully you (as webmaster presumably) will receive an email telling you what the exact error is, but at least we now know it's a database error. Wink

(and as your psuedo module isn't doing any database calls it's probably in plogger)

_________________
Gaming League / Cup - www.leaguecms.co.uk :: Other DragonFly modules - www.cmsdreams.co.uk

Kendle's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
keekwai
Nice poster
Nice poster

Offline Offline
Joined: Apr 01, 2008
Posts: 50
Location: Thailand
PostPosted: Sat Jul 09, 2011 2:09 am
Post subject: Re: Plogger Image Gallery Integration

Here's the email I received ...
Code::
On /gallery.html
While executing query "SELECT COUNT(*) FROM cms_session WHERE uname='343c5500b29a3b632b27ce1ddac12158'"

the following error occured: Table 'ajarnmar_gallery.cms_session' doesn't exist

In: /home/ajarnmar/public_html/header.php on line: 44


Plogger only has 6 tables in a separate database called "ajarnmar_gallery"

Code::
plogger_albums		 		 		 	
plogger_collections		 		 		 	
plogger_comments		 		 		 	
plogger_config		 		 		 	
plogger_pictures		 		 		 	
plogger_thumbnail_config

Looks like it's looking for a DF table ????

_________________
Ajarnmark

keekwai's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
XP/Apache 2.0/MySQL5.0.77/Dragonfly9.2.1
Back to top
View user's profile Visit poster's website
Kendle
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Dec 16, 2004
Posts: 552

PostPosted: Sat Jul 09, 2011 8:37 am
Post subject: Re: Plogger Image Gallery Integration

My guess is that plogger has taken over the connection to the database, so that when DF tries to access it's tables it's now connected to plogger's database rather than its own.

You could try putting plogger's tables in your DF database, or, in gallery/plog-includes/plog-functions.php change line 516 from this :-

Code::
$PLOGGER_DBH = mysql_connect(PLOGGER_DB_HOST, PLOGGER_DB_USER, PLOGGER_DB_PW) or die(plog_tr('Plogger cannot connect to the database because: ').mysql_error());

to this :-

Code::
$PLOGGER_DBH = mysql_connect(PLOGGER_DB_HOST, PLOGGER_DB_USER, PLOGGER_DB_PW, true) or die(plog_tr('Plogger cannot connect to the database because: ').mysql_error());

This should tell plogger to establish it's own separate connection to the database rather than hyjack the connection DF had previously established.

_________________
Gaming League / Cup - www.leaguecms.co.uk :: Other DragonFly modules - www.cmsdreams.co.uk

Kendle's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
keekwai
Nice poster
Nice poster

Offline Offline
Joined: Apr 01, 2008
Posts: 50
Location: Thailand
PostPosted: Sat Jul 09, 2011 9:43 am
Post subject: Re: Plogger Image Gallery Integration

Making progress now. I tried the file edit on plog-functions.php first. Same problem.

I changed it back and tried the database option and moved the Plogger tables into the DF database and edited Plogger's "plog-config.php"

... and that works! ... Sort of. See here .. Link ajarnmark.com/gallery.html

Everything is at the bottom of the page. I'm still using the index.php above in the Module folder. i.e

Code::
<?php
/**
* CPG Dragonfly CMS
* Copyright © 2004 - 2006 by CPG-Nuke Dev Team, dragonflycms.org
* Released under the GNU GPL version 2 or any later version
* $Id: index.php,v 1.4 2006/10/07 07:54:11 nanocaiordo Exp $
*/

// protect against direct access
if (!defined('CPG_NUKE')) { exit; }
require("gallery/plogger.php");
global $modheader;
ob_start();
the_plogger_head();
$modheader .= ob_get_contents();
ob_end_clean();
require('header.php');
the_plogger_gallery();

// close the table that we have created

// there isn't any need to include the footer, as the index page handles this already
// require('footer.php');

_________________
Ajarnmark

keekwai's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
XP/Apache 2.0/MySQL5.0.77/Dragonfly9.2.1
Back to top
View user's profile Visit poster's website
keekwai
Nice poster
Nice poster

Offline Offline
Joined: Apr 01, 2008
Posts: 50
Location: Thailand
PostPosted: Sat Jul 09, 2011 9:51 am
Post subject: Re: Plogger Image Gallery Integration

OK .. I had a Google ad in Ploggers header.php. I removed that and now it looks OK ... but the links are wrong.

When I click on an album .. the link is ...

Code::
http://ajarnmark.com/index.php?level=collection&id=2

...instead of ...

Code::
http://ajarnmark.com/gallery/index.php?level=collection&id=2

It's going to DF's Index instead of Ploggers.


Link .. ajarnmark.com/gallery.html

NOTE: It seems Ploggers css is taking over a little too. The titles in my blocks have changed from white to blue.

EDIT. I just altered Ploggers css .. so that's OK now. But the linking is still broken.

_________________
Ajarnmark

keekwai's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
XP/Apache 2.0/MySQL5.0.77/Dragonfly9.2.1
Back to top
View user's profile Visit poster's website
Kendle
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Dec 16, 2004
Posts: 552

PostPosted: Sat Jul 09, 2011 3:04 pm
Post subject: Re: Plogger Image Gallery Integration

In gallery/plog-config.php there's this directive :-

Code::
define('PLOGGER_EMBEDDED', '');

Might be an idea to change this to :-

Code::
define('PLOGGER_EMBEDDED', '1');

_________________
Gaming League / Cup - www.leaguecms.co.uk :: Other DragonFly modules - www.cmsdreams.co.uk

Kendle's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
keekwai
Nice poster
Nice poster

Offline Offline
Joined: Apr 01, 2008
Posts: 50
Location: Thailand
PostPosted: Sat Jul 09, 2011 3:50 pm
Post subject: Re: Plogger Image Gallery Integration

OK .. tried that. No change. It's still pointing to the DF index.

_________________
Ajarnmark

keekwai's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
XP/Apache 2.0/MySQL5.0.77/Dragonfly9.2.1
Back to top
View user's profile Visit poster's website
Kendle
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Dec 16, 2004
Posts: 552

PostPosted: Sat Jul 09, 2011 5:47 pm
Post subject: Re: Plogger Image Gallery Integration

Well, last suggestion from me cos I've no further ideas after this one, turn off LEO.

If that doesn't work you're probably looking at asking someone to port plogger to make it a proper DF module, tho I question why you would do so when there's coppermine already in place (even tho coppermine is a bit of pig to be fair).

_________________
Gaming League / Cup - www.leaguecms.co.uk :: Other DragonFly modules - www.cmsdreams.co.uk

Kendle's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
keekwai
Nice poster
Nice poster

Offline Offline
Joined: Apr 01, 2008
Posts: 50
Location: Thailand
PostPosted: Sat Jul 09, 2011 6:19 pm
Post subject: Re: Plogger Image Gallery Integration

It's just the cluttered ugly look of coppermine that gets me. I also don't need users being able to upload pics.

... but thanks for all the help so far. If I can't get it working this way I can always go back to the iFrame method. It looked OK. I just think iFrames are a bit of a sloppy way to go.

EDIT: Just turned LEO off .... IT WORKS! Dam! Thanks for that. Have a virtual beer on me! Smile

_________________
Ajarnmark

keekwai's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
XP/Apache 2.0/MySQL5.0.77/Dragonfly9.2.1
Back to top
View user's profile Visit poster's website
layingback
Forum Admin
Forum Admin

Offline Offline
Joined: Apr 19, 2004
Posts: 1040

PostPosted: Sun Jul 10, 2011 8:28 am
Post subject: Re: Plogger Image Gallery Integration

keekwai wrote:
It's just the cluttered ugly look of coppermine that gets me. I also don't need users being able to upload pics.

If by "cluttered" and "ugly" you mean the imagery, then have you considered reDesign3 theme which simplifies the graphics used in coppermine immensely - and offers you easy control over changing them?

But if it is the general multiplicity of links that offends have you considered Pro_News to display the CPG albums? I added photo gallery support - 1 album per article configurable up to 32 images per page - expressly to address my concern over the "cluttered ugly look of coppermine". And it has the added advantage of permitting, optionally, text description alongside the images. Also user access to the displayed CPG album is not required at display time - meaning that on many of my sites CPG is not available at all. Here's an example.

_________________
Pro_News: The complete module for Dragonfly - now available as version 3.3

layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6 - 3.6 / 1.3.42 - 2.2.12 / 5.0.92 - 5.1.37 - 5.1.54 / 4.4.49 - 5.2.17 - 5.3 / 9.2.1
Back to top
View user's profile Visit poster's website Photo Gallery
Display posts from previous:   
Post new topic    Reply to topic    Printer Friendly Page    Forum Index ⇒  Add-Ons & Blocks
Page 1 of 2
All times are GMT
Go to page 1, 2  Next



Jump to:  


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


 
   Toggle Content User Info

Welcome Anonymous

Nickname
Password
(Register)

   Toggle Content Last CVS commits
· Fixed .ico Expires header.
· Removed domain name from cookies so subdomains wont access them anymore.
· CSS and JS, case insensitives.
· CSS and JS, send correct HTTP 1.1 headers and fixed issues where themes and...
· Further security class improvements.
· 301 redirects on LEO changes
· Option to force 3xx http status codes
· Validate googlebot.com and google.com crawlers.
· CCBot
· Rss with etag and atom.

อ่านต่อ...

   Toggle Content Community

Support for DragonflyCMS in a other languages:

Deutsch
Español

   Toggle Content X-links
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
Interactive software released under GNU GPL, Code Credits, Privacy Policy