Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorxiphias
    • CommentTimeSep 2nd 2009 edited
     
    Hi,

    From what I read on the web there's a lot of need for a joomla plogger component. I've done some basic modules on Joomla 1.0.x but I've challanged myself to create a basic plogger component for joomla 1.5.

    A little background, Windows Server, PHP4, MySQL3 (I think), Joomla 1.5 (works fine without Plogger), sitename_joomla DB for Joomla, sitename_Plogger DB for plogger (keep things seperate and smaller DB size but seems to give me problems.)
    In the plog-config.php I set embedded to 1.
    I'm not to familiar with PHP yet but do have prior application coding (long time ago in Pascal) and webdevelopment (ASP, CFML, java-/cfscript).

    I tried a verry basic component which basicly only had <?php the_gallery(); ?> in it and the include and head code is hardcoded in my template. When I call the component I get a white page so something is going wrong there.

    Since I'm using the SVN version the included gallery.php is just for backwards compatibility so I then took the code from it and included plogger.php and called the_plogger_head() and return the_plogger_gallery().

    To avoid the greation of a real component I just put all of this in my template, so at the top before <!DOCTYPE... I put:
    // including plogger file
    include_once(JPATH_ROOT . '/plogger/plogger.php');

    between <head> and </head> I put:
    <?php the_plogger_head(); ?>

    and at the spot where the main Joomla body would be displayed I put:
    <?php the_plogger_gallery(); ?>

    I figured this would basicly show my complete Joomla site with the plogger gallery on every page.

    This seems to work fine although I get a lot of errors. None of the Joomla components are showing anymore. Looks like Joomla has a db=sitename_Joomla and then plogger does db=sitename_Plogger so Joomla tables unreachable. I could put them together but would be nicer if it would run seperatly, that way creating a Joomla site and including a running Plogger would be easier.

    Appart from the Joomla errors Plogger isn't working OK. I can browse collections, albums and images but they aren't showing any images. Here is some of the plogger code generated in the template.

    <title>USA Sport Fotografie: Collections</title>
    <meta http-equiv="Content-Type" content="text/html;charset=" />
    <meta http-equiv="imagetoolbar" content="false" />
    <link rel="alternate" type="application/rss+xml" title="RSS Feed" href="http://www.domain.ext/plogger/plog-rss.php?level=collections&amp;id=0" />
    <link rel="alternate" type="application/rss+xml" title="Cooliris feed" href="http://www.domain.ext/plogger/plog-cooliris.php?level=collections&amp;id=0" id="gallery" />
    <link rel="stylesheet" href="/gallery.css" type="text/css" media="screen" />
    <script src="/dynamics.js" type="text/javascript" ></script>
    <!--[if lte IE 6]>
    <link rel="stylesheet" href="/explorer.css" type="text/css" media="screen" />
    <![endif]-->

    The RSS/Cooliris links are generated via the plog-functions, guess that the gallery.css, dynamics.js and explorer.css need to be done in simular way.

    This is collection generated by plogger.

    <div class="collection">
    <a class="collection-image-link" href="/?level=collection&amp;id=2"><img class="photos" src="/" title="Baseball" alt="Baseball" /></a>
    <h2><a href="/?level=collection&amp;id=2">Baseball</a></h2>
    <span class="meta-header">Contains 4 Albums</span>
    <p class="description">Baseball en softball foto's</p>
    </div>

    The href should be simular to the RSS links the thumbnail SRC is completely wrong and link below also needs full URL.
    Even better would be that plogger gets the URL that was called forinstance /?option=com_plogger&ItemId=15?level=collection&id=2 and change the level and id tokens so that the querystring used by main site stays in tact.

    I think plogger reads the parents folder but when included it's different from the plogger folder. Include pasth should be added I guess or something.

    @sidtheduck: do you have any tips for me and should I post a ticket about the last bit with the correct URL's.

    Has anyone accomplished a joomla/plogger successfull integration or is anybody working on it, maybe it's an idea to team up.

    Friendly regards,



    Michael Rosa



    P.S. The plog-cooliris.php thing is something I'm working on to make plogger Cooliris/PicLens compatible. I've added a ticket and files to the dev.
    •  
      CommentAuthorxiphias
    • CommentTimeSep 2nd 2009
     
    A little more info:

    When I move the <?php the_plogger_gallery(); ?> from my template index.php to my com_plogger/plogger.php I get a blank page :S

    I think I'll copy the plogger tables to my Joomla database to see if this solves some of the integration issues with joomla beeing blank.

    - Michael
    •  
      CommentAuthorxiphias
    • CommentTimeSep 2nd 2009
     
    An other update.

    I copied the plogger tables from my plogger database to my joomla database and when I have the plogger include in my template the site runs fine.
    Still, when I put the <?php the_plogger_gallery(); ?> code in a component (which only holds <?php the_plogger_gallery(); ?>) I get a blank page, putting the code in my template mainbody again seems to work but still with the same problems with the wrong links etc.

    Slowly we're getting there, now if I could only have the plogger_gallery code in a component the basis would be there.

    Then I need to try and figure out how to include the plogger code and head without editing my joomla template.

    Any help is welcome.
    •  
      CommentAuthorxiphias
    • CommentTimeSep 3rd 2009
     
    OK, I got it partialy working. I removed the include and plogger_head from my joomla template index.php and put the include and plogger_gallery in my com_plogger/plogger.php and the component then sort of works. Problem now is that I don't have the plogger head stuff in my head, most importantly my altered plog-rss.php for Cooliris. I could somehow include that in my joomla tempalte index.php by taking some code from plog-functions.php. Not the best way but a work around.

    Problem now is that I still don't get to see the images.

    The main Plogger gallery

    <div class="collection">
    <a class="collection-image-link" href="/?level=collection&amp;id=2"><img class="photos" src="/" title="Baseball" alt="Baseball" /></a>
    <h2><a href="/?level=collection&amp;id=2">Baseball</a></h2>
    <span class="meta-header">Contains 4 Albums</span>
    <p class="description">Baseball en softball foto's</p>
    </div>


    The href should be /?option=com_plogger&level=collection&id=2
    the img src is also wrong, it just has /.

    Manualy going into the Baseball collection by using the above link works but the generated page is wrong agian.

    <div class="collection">
    <a class="collection-image-link" href="/?level=album&amp;id=6"><img class="photos" src="/" title="2009-08-15" alt="2009-08-15" /></a>
    <h2><a href="/?level=album&amp;id=6">2009-08-15</a></h2>
    <span class="meta-header">Contains 22 Pictures</span>
    <p class="description">Konica Minolta Pioniers 4-2 L&D Amsterdam</p>
    </div>


    The href here should be /?option=com_plogger&level=album&id=2
    the img src is also wrong, it just has / again.

    Going to the correct url again works but the generated code is incorrect again.

    <li class="thumbnail"style="margin-left: 174px">
    <a href="/?level=picture&amp;id=1" title="07-30-2009"><img id="thumb-1" class="photos" src="/" width="px" height="px" title="07-30-2009" alt="07-30-2009" /></a>
    <div class="checkbox"></div>
    <p style="width: px;">07-30-2009</p>
    </li>


    The href here should be /?option=com_plogger&level=picture&id=1
    and again the img src is /.

    Again, going to /?option=com_plogger&level=picture&id=1 works fine accept for what Plogger returns.

    <div class="clearfix">
    <ul id="thumb-nav">
    <li class="current"><a href="/?level=picture&amp;id=1" title=""><img src="/" alt="" /></a></li>
    <li class=""><a href="/?level=picture&amp;id=2" title=""><img src="/" alt="" /></a></li>
    <li class=""><a href="/?level=picture&amp;id=3" title=""><img src="/" alt="" /></a></li>
    <li class="current"><a href="/?level=picture&amp;id=1" title=""><img src="/" alt="" /></a></li>
    <li class=""><a href="/?level=picture&amp;id=2" title=""><img src="/" alt="" /></a></li>
    <li class=""><a href="/?level=picture&amp;id=3" title=""><img src="/" alt="" /></a></li>
    <li class="current"><a href="/?level=picture&amp;id=1" title=""><img src="/" alt="" /></a></li>
    <li class=""><a href="/?level=picture&amp;id=2" title=""><img src="/" alt="" /></a></li>
    <li class=""><a href="/?level=picture&amp;id=3" title=""><img src="/" alt="" /></a></li>
    </ul>
    </div>


    and

    <div id="picture-holder">
    <a accesskey="v" href="#"><img class="photos-large" src="/plog-content/themes/sfus/images/wtrmrk-XiPHiAS.png" title="&nbsp;" alt="&nbsp;" style="background:url(); background-repeat:no-repeat; background-position:center; width:px; height:px;"" /></a>
    </div>


    This is a bit different from the regular plogger theme, I modified it to have a watermark over the image, not fullsave but it's better then nothing. The real image is shown in as the background of the watermark but url() is empty.
    •  
      CommentAuthorxiphias
    • CommentTimeSep 3rd 2009
     
    (--- part 2 ---)

    Standalone this last page give me

    <div class="clearfix">
    <ul id="thumb-nav">
    <li class="current"><a href="http://j15.sportfotografie.us/plogger/?level=picture&amp;id=1" title=""><img src="http://j15.sportfotografie.us/plogger/plog-content/thumbs/baseball/2009-07-30/thumbnav/1-kin_pio-xip_7052-10x15.jpg" alt="" /></a></li>
    <li class=""><a href="http://j15.sportfotografie.us/plogger/?level=picture&amp;id=2" title=""><img src="http://j15.sportfotografie.us/plogger/plog-content/thumbs/baseball/2009-07-30/thumbnav/2-kin_pio-xip_7060-10x15.jpg" alt="" /></a></li>
    <li class=""><a href="http://j15.sportfotografie.us/plogger/?level=picture&amp;id=3" title=""><img src="http://j15.sportfotografie.us/plogger/plog-content/thumbs/baseball/2009-07-30/thumbnav/3-kin_pio-xip_7063-10x15.jpg" alt="" /></a></li>
    <li class="current"><a href="http://j15.sportfotografie.us/plogger/?level=picture&amp;id=1" title=""><img src="http://j15.sportfotografie.us/plogger/plog-content/thumbs/baseball/2009-07-30/thumbnav/1-kin_pio-xip_7052-10x15.jpg" alt="" /></a></li>
    <li class=""><a href="http://j15.sportfotografie.us/plogger/?level=picture&amp;id=2" title=""><img src="http://j15.sportfotografie.us/plogger/plog-content/thumbs/baseball/2009-07-30/thumbnav/2-kin_pio-xip_7060-10x15.jpg" alt="" /></a></li>
    <li class=""><a href="http://j15.sportfotografie.us/plogger/?level=picture&amp;id=3" title=""><img src="http://j15.sportfotografie.us/plogger/plog-content/thumbs/baseball/2009-07-30/thumbnav/3-kin_pio-xip_7063-10x15.jpg" alt="" /></a></li>
    <li class="current"><a href="http://j15.sportfotografie.us/plogger/?level=picture&amp;id=1" title=""><img src="http://j15.sportfotografie.us/plogger/plog-content/thumbs/baseball/2009-07-30/thumbnav/1-kin_pio-xip_7052-10x15.jpg" alt="" /></a></li>
    <li class=""><a href="http://j15.sportfotografie.us/plogger/?level=picture&amp;id=2" title=""><img src="http://j15.sportfotografie.us/plogger/plog-content/thumbs/baseball/2009-07-30/thumbnav/2-kin_pio-xip_7060-10x15.jpg" alt="" /></a></li>
    <li class=""><a href="http://j15.sportfotografie.us/plogger/?level=picture&amp;id=3" title=""><img src="http://j15.sportfotografie.us/plogger/plog-content/thumbs/baseball/2009-07-30/thumbnav/3-kin_pio-xip_7063-10x15.jpg" alt="" /></a></li>
    </ul>
    </div>


    and

    <div id="picture-holder">
    <a accesskey="v" href="#"><img class="photos-large" src="plog-content/themes/sfus/images/wtrmrk-XiPHiAS-p.png" title="&nbsp;" alt="&nbsp;" style="background:url(http://j15.sportfotografie.us/plogger/plog-content/thumbs/baseball/2009-07-30/large/1-kin_pio-xip_7052-10x15.jpg); background-repeat:no-repeat; background-position:center; width:450px; height:600px;"" /></a>
    </div>


    My guess is that these problems come from all the dirname(__FILE__) usage in Plogger. If /plogger/index.php is used than /plogger would be the dirname and dirname(__FILE__).'/plog-load-config.php' would work (/plogger/plog-load-config.php).
    When embedded plogger is loaded from /index.php and / would be the dirname and dirname(__FILE__).'/plog-load-config.php' would result in //plog-load-config.php which doesn't exist.

    Why wont Plogger integrate into Joomla as easy as it says on the website, just add 3 php lines. I see Wordpress works a lot different, you can just add the Wordpress includes to a page with the 3 Plogger lines and done. I wonder if I should try something simular with Joomla.

    Has anyone got Plogger working in Joomla without putting it in a iframe wrapper. An iframe wrapper won't realy work for me.

    Still, any help is welcome.

    - Michael
    •  
      CommentAuthorsidtheduck
    • CommentTimeSep 3rd 2009
     
    xiphias,

    I'm new to Joomla, so please bear with me as I am not familiar with the inner codings.

    To start off, where is your Plogger installation in relation to your Joomla installation? From your description, it looks like the Plogger directory is a subfolder of the Joomla directory. Is this correct? Like this:
    -/Joomla/
    -/plogger/
    -plogger.php


    The reason I ask is that I did a very basic installation of Joomla on my own site, and used the 3 lines of code and it shows up just fine for me, including all of the links and full paths to the pictures.

    I have no idea how components are created within Joomla, so I won't be much help there, but Plogger should be able to be included into your Joomla integration.
    •  
      CommentAuthorxiphias
    • CommentTimeSep 4th 2009
     
    Hi Sid,

    Sitestructure is (all lowercase though):
    \
    <JOOMLA FOLDERS>
    PLOGGER
    plogger.php
    <joomla files>


    So plogger is at same level as joomla administrator, images, modules, etc folders.
    http://j15.sportfotografie.us/?option=com_plogger

    \components\com_plogger\plogger.php has:
    <p>Hello World!!</p>
    <?php
    require("/plogger/plogger.php");
    //the_plogger_head();
    the_plogger_gallery();
    ?>

    Result can be seen at URL above.

    If I put this code in my joomla template, which should be /index.php since /templates/template/index.php is included, the result is the same, wrong links etc.

    How did you add it to Joomla, I have it in there now with an iframe wrapper but that is not the way I want to go live.
    •  
      CommentAuthorsidtheduck
    • CommentTimeSep 4th 2009
     
    xiphias,

    I've been looking into Joomla components some more to get familiar with some of the structure and I'll test out your code on my test site. If I may ask, what version of Joomla are you using? I just realized mine is a little out of date (version 1.0.something and now there's 1.5.something I think?) I can upgrade to your version if you let me know what it is.

    In the meantime, can you check your Plogger Admin -> Options tab and let me know that the Gallery URL is? That is partially how the paths to the images are created. Also, if you could make sure your Plogger install has this fix, that may be part of the issue as well (I just figured out that bug yesterday researching why Plogger was having issues with Wordpress).
    •  
      CommentAuthorxiphias
    • CommentTimeSep 4th 2009
     
    Tres vage, did CTRL-Z untill all changes made in template index.php and com_plogger\plogger.php were undone, upload and still get hello world. Looks like all PHP is skipped.
    •  
      CommentAuthorsidtheduck
    • CommentTimeSep 4th 2009 edited
     
    Hi xiphias,

    I was able to get Plogger embedded using a very basic Joomla! component. Basically, I used this code as my component/com_plogger/plogger.php:
    <?php
    // include Plogger
    require_once(dirname(JPATH_ROOT).'/plogger/plogger.php');
    // add the Plogger head tags to the <head></head> tag
    $document =& JFactory::getDocument();
    $document->addCustomTag(the_plogger_head());
    // output the gallery
    the_plogger_gallery();
    ?>

    No need for any template changes. However, the path to Plogger on your site is different (my installation has Plogger in a folder at the same level as the Joomla folder), so for your installation, you could try this code:
    <?php
    // include Plogger
    require_once(JPATH_ROOT.'/plogger/plogger.php');
    // add the Plogger head tags to the <head></head> tag
    $document =& JFactory::getDocument();
    $document->addCustomTag(the_plogger_head());
    // output the gallery
    the_plogger_gallery();
    ?>


    Let me know if you are still running into issues.

    EDIT: Just noticed the Plogger head stuff is not being added to the head tags. Looking into that now.
    •  
      CommentAuthorsidtheduck
    • CommentTimeSep 4th 2009 edited
     
    Alright, edited code.

    Try this on for size as component/com_plogger/plogger.php:
    <?php
    // include Plogger
    require_once(JPATH_ROOT.'/plogger/plogger.php');

    // add the Plogger head tags to the <head></head> tag
    // we need to buffer the output to keep the head information from echoing
    ob_start();
    the_plogger_head();
    $the_plogger_head = ob_get_contents();
    ob_end_clean();
    $document =& JFactory::getDocument();
    $document->addCustomTag($the_plogger_head);

    // output the gallery
    the_plogger_gallery();
    ?>
    •  
      CommentAuthorxiphias
    • CommentTimeSep 4th 2009
     
    Thanks Sid, that seems to work great. Now I guess as a quick fix I'll hardcode the ?option=com_plogger& in URL's.
    Then I'll have to work on the backend to make linking to a catalog/album easier. Idea is that if you go to baseball and then foto's yould see the baseball collection with the baseball news and ads around it. For that I also need the itemID but I guess for now I can just do the quickfix.

    Thanks for the help.

    -Michael
    •  
      CommentAuthorxiphias
    • CommentTimeSep 5th 2009
     
    One step further.

    In plog functions I've added some code to the function generate_url at line 1403 above return $rv;

    // Add Joomla strings to URL
    if ($level != 'admin') {
    $rv .= "&option=com_plogger&Itemid=".$_GET['Itemid'];
    }


    Maybe it's an idea to add the embedded flag to the admin options and then add an extra field for these extra options.

    I just seem to have some CSS issues on the level=picture pages and when com_plogger is loaded my joomla menu items are centered. I'll have to get into the CSS for this.

    From http://j15.sportfotografie.us go to baseball | foto's to get the plogger component.

    Thanks for all the help Sid.
    •  
      CommentAuthorxiphias
    • CommentTimeSep 5th 2009
     
    Hey Sid,

    In my picture.php in my Plogger template I had hardcoded a url to a watermark image. I still have to look into the watermark.php I found here on the forums, but couldn't get that to work 123 so fell back to my
    img src=watermark style"background-image:url(picture);
    In the src I used /plog-content/themes/sfus/images/watermark.png
    Since I'ld like to keep things easy for others to modify etc I wanted to use the theme_url here.

    So I used $config['theme_url'] but looks like this works in plog-rss.php but not in themes/.../picture.php where you need to use THEME_URL.
    Maybe it's an idea to use the same everywhere to make it easy for customizers.

    Still some CSS things to work out but it's getting there, including the print ordering functionality.

    Thanks again for the great help sid.
    •  
      CommentAuthorxiphias
    • CommentTimeOct 2nd 2009
     
    Hi Sid,

    I still had the Plogger tables included in my Joomla schema so I thought I'ld split them up. I backuped the plogger_ tables and restored them to the Plogger schema and altered plog-config.php to point to the Plogger schema. When I do that I get the same message again that jos_modules can't be found. So I switched it back and runs fine in one DB.

    Gr,



    Michael
    • CommentAuthoredwink
    • CommentTimeJul 1st 2014 edited
     
    <deleted>
    • CommentAuthoredwink
    • CommentTimeJul 9th 2014 edited
     
    So, I've got

    WWW-root
    Joomla - folder
    ---Plogger - folder

    So, plogger is in the Joomla-folder.

    In joomla I created com_plogger/ and put plogger.php there

    <code>
    <?php

    // include Plogger
    require_once(dirname(JPATH_ROOT).'/gallery/plogger.php');

    // add the Plogger head tags to the <head></head> tag
    $document =& JFactory::getDocument();
    $document->addCustomTag(the_plogger_head());

    // output the gallery
    the_plogger_gallery();

    ?>
    </code>

    But how can I let the gallery show up in Joomla? Either in menu or main-part of it.
    •  
      CommentAuthorxiphias
    • CommentTimeAug 22nd 2014
     
    Make a link to ?option=com_plogger