Payments by PayPal

Solution Graphics

Lunarpages.com Web Hosting

 

I have successfully embedded Plogger into Drupal 6x and managed to make it work correctly from with in the Drupal NODE. A few line changes and it works correctly. Working Example - http://2faroffroad.com/gallery

Using Drupal 6.x and Plogger 1.0 RC1

Updated10-4-2010 

Upload the plogger install folder into the main Drupal folder


--- drupal folder (yoursite.com)
--- --- plogger folder (yoursite.com/plogger)

Plogger should be set up and working correctly in "yoursite.com/plogger" before starting.
If it is not then the following mod may not work correctly.

Though we should only be messing with the Plogger database, it is still reccomended to Back-Up the Drupal db and the Plogger db before hacking the code. 

1st.
Create a new PAGE  NODE, name it "gallery"

Important: Fix the URL path to just "gallery" and not "content/gallery"
Add the following to the node content and set the input format to PHP and save. 

 

<?php include("plogger/gallery.php"); ?>
<?php the_gallery_head(); ?>
<?php the_gallery(); ?>

It should be accessable from "yoursite.com/gallery" and should now show your Drupal site with the gallery loaded. 
Note: Should give error 404 if gallery is clicked.

Then...

Open and edit "plogger/plog-includes/plog-functions.php"

Around line 29 find

$collections_link = '<a href="'.generate_url('collections').'">'.$title.'</a>';
$collections_name = '<strong>'.$title.'</strong>';

Replace with

$collections_link = '<a href="/gallery">'.$title.'</a>';
$collections_name = '<strong>'.$title.'</strong>';

Continue editing "plogger/plog-includes/plog-functions.php" 
Find around line 1456

switch($level) {
// Admin section for generate_url
case 'admin':
$rv = $config['baseurl'].'plog-admin/plog-'.$id.'.php?'.substr($args, 5);
break;
// Front end section for generate_url
case 'collection':
$rv = $config['baseurl'].$query.'level=collection&amp;id='.$id.$args; break;
case 'album':
$rv = $config['baseurl'].$query.'level=album&amp;id='.$id.$args; break;
case 'picture':
$rv = $config['baseurl'].$query.'level=picture&amp;id='.$id;
break;
case 'search':
$rv = $config['baseurl'].$query.'level=search'.$args;
break;
case 'collections':
default:
$rv = $config['baseurl'];:

Replace only the yellow highlited $config['baseurl'] shown above with 'gallery'
Do not change the red $config['baseurl']
Note: You must include the ' before and after the folder name = 'gallery' or it will not work.

Example:

fdswitch($level) {
// Admin section for generate_url
case 'admin':
//do not change the frist $config['baseurl']
$rv = $config['baseurl'].'plog-admin/plog-'.$id.'.php?'.substr($args, 5);
break;
// Front end section for generate_url
case 'collection':
$rv = 'gallery'.$query.'level=collection&amp;id='.$id.$args;
break;
case 'album':
$rv = 'gallery'.$query.'level=album&amp;id='.$id.$args;
break;
case 'picture':
$rv = 'gallery'.$query.'level=picture&amp;id='.$id;
break;
case 'search':
$rv = 'gallery'.$query.'level=search'.$args;
break;
case 'collections':

default:
$rv = $config['baseurl'];:

 

The first and last $config['baseurl'] should be left the same. This allows the admin session to work outside the node.

Save and upload.

Visit "yoursite.com/plogger/plog-admin" to edit the plogger system.
Visit "yoursite
.com/gallery" to view the plogger powered gallery.

Here is a working example of the above changes --> http://2faroffroad.com/gallery

About me and the above code..

I am not a drupal coder and only have basic knowledgeable about php.
The above is how I managed to get both to work together.
If you find a error let me know below in the commemts and I'll correct/change it.

Only issue I can see is that Cruft-Free URLs do not work.
I am just happy I got Plogger to work.

Viewing the gallery at "yoursite.com/plogger" should only be used by the admin. It will not work from the user end.  

"yoursite.com/gallery" and "yoursite.com/plogger/plog-admin" does as far as I can tell and have tested

What was used.
Drupal 6.15 and Plogger 1.0 RC1 were used.

Drupal.org - Plogger.org

Download Plogger here! (Version 1.0 RC1, 700 kb)

Anonymous
problem
Please see this example http://www.mourady.me/arabicsupervisor/node/47 What I did wrong ? not working can you show us a working example Thanks
2faroffroad
Offline
Joined: 12/13/2009
My example
Anonymous
Figured it out...
You can ignore/delete the previous comment.  Epiphanies always hit after pressing "submit". I forgot I install plogger within my theme's directory, rather than at the root.  Therefore, though example.com renders my theme to the browser, to access plogger where I put it I have to go to example.com/sites/all/themes/mytheme/plog-admin. Ay.
Anonymous
How do you administer?
Thanks for the writeup, helped a lot.  I installed it and set up some galleries, and it all works fine, only now, a day later, the galleries still work but I can't figure out how to login to plogger to add new ones. ?  I believe something in my drupal template is blocking it (if I try to go to example.com/plog-admin or a plogger page it gives me a "page not found" error).  I know they're there.  Do I have to include something in php somewhere?  Or do I just not know the right url? Thanks if you can help. I imagine it's something to do with my template, so I will keep looking at it.  It worked when I first installed, but I never navigated away from the set up page the install opened.
Anonymous
wrong location..
  Does example.com reslove to your main plogger directory? It should be something like example.com/path-to-plogger/plog-admin! example.com/gallery-node will not allow admin to work from it!
Anonymous
thanks
thanks for this, really helped.  you should shoot an email to the plogger people to link this from their site, really useful.
Anonymous
wow this is great!!! thanks
Wow, it worked great. thanks.
Welcome:
Login | Register

Shopping cart

View your shopping cart.

Random Images!
p1011239
dscf2563
dscf3057___
dscf0014
dscf0078

page.tpl