Slight G2/WordPress integration - adding home link to G2

haggis
haggis's picture

Joined: 2004-05-27
Posts: 17
Posted: Sat, 2005-04-09 14:25

Installed WP1.5 and G2, then did a whole lot of integration RTFM, realizing somewhat later that this is still a work in progress. So be it, a compromize solution seems to be in order! :D I need some help in finding out where to place hyperlinks to accomplish what is written below.......

I'm trying to tie in WorPress and G2 somewhat in the following way:

1. WordPress is the site "homepage" and has G2 images in the sidebar nice! BTW (and can be seen at: http://koen.haggis.nl/ )
2.
a) In G2 I want to be able to put a "Home" link for dear readers to use when they have seen their images and wish to return to the main part of the site.

In G2 (Dark Fiber) There are two parallel bars at the top of each and every page where "Gallery > Album > Sub_Album" nav path is displayed. I'd like to show a "Home" link to the left of the Gallery Home link. Meaning in other words hard to the very left of that neat nav path, with a space (or spacer) separating "Site Home" from "Gallery Home > nav > path". I see it looking like this:
Site Home || Gallery Home > test_album > sub_test_album

b) Put a "Site Home" link below the search box (above "actions") visible to a non logged in user. (in this case there is only one user...the admin, all others are unregistered vistors/viewers which I think might make this easier to accomplish).

Layout and theme in use is Matrix in both cases (why change it, it looks great!!)

Can anyone please tell me how to accomplish these two tiny little hacks?? I have *no* idea which file to edit, and/or where within the file to put these two hyperlinks (top and sidebar) referred to above.

Until such time as there is a formal integration package/plugin/whatever, this small step will at least create a visual relationship between the two apps.

Regards & TIA!!!!
-Colin

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2005-04-09 16:48

moved to G2

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2005-04-09 17:06

see this topic for some info about detecting logged-in vs guest..

you can easily add these things with local templates.. look at layouts/matrix/templates/pathbar.tpl and templates/sidebar.tpl. Every tpl file has instructions at the top for making a local copy you can edit. For pathbar you'll want to add <li class="firstChild"><a ...... </a></li> just after <ul class="gbBreadcrumb">, then remove the {if.... firstChild"{/if} just below that and make it just <li>

 
haggis
haggis's picture

Joined: 2004-05-27
Posts: 17
Posted: Sat, 2005-04-09 17:18

I'm on it! thanks for taking the time to respond.

Sorry I goofed on sticking this in the wrong forum

 
haggis
haggis's picture

Joined: 2004-05-27
Posts: 17
Posted: Sat, 2005-04-09 18:33

Absolutely Outstanding!!!!!!!!!!

Nothing broke, everything works, this was as close to painless as it's humanly possible to get.
Thanks a GAZILLION for such clear and precise instructions.

Evidence of your work can be seen here:

http://koen.haggis.nl/gallery/main.php

Many many thanks,
-Colin

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2005-04-09 20:05

oh, your G2 is older so the class="firstChild" thing didn't work right (the >> to the left of your home link instead of between the home link and Gallery).. otherwise, looks great.

 
haggis
haggis's picture

Joined: 2004-05-27
Posts: 17
Posted: Sun, 2005-04-10 11:59

I noticed the extra ">>" to the left of the Homepage link only after reading your response!!

Interestingly IE and MyIE (Maxthon) both show:
>>Homepage Gallery >>album>>picture
(nothing between homepage and gallery IOW) :roll:

Whereas Firefox shows:
>>Homepage >> Gallery >> album >> picture

I gotta say it's good and an optimal result. Bottom line is I'm delighted :) In a perfect world this would make me rush out and boldly download the new gallery, then follow your instructions again to make it perfect. However, I'm dong this entire exercise again (this time for myself!!) and thus I'll have a later Gallery anyway, and will have this link goodness in all its purity!!!!

:lol: :lol: :lol: :lol:
(translation: /me is a really happy camper)

Thanks again.

 
jbinto

Joined: 2005-04-11
Posts: 1
Posted: Mon, 2005-04-11 11:32

Hey,

Just thought I'd let you know how I managed to improve the appearance of the header (in IE as well). There is no starting >> now and when you are in the main Gallery it also looks good. Here is my code in pathbar.tpl:

<ul class="gbBreadCrumb">
    <li class="giBreadCrumbFirst">
       <a href="http://jb-online.net/">jb-online - Home</a>
    </li>
    {section name=parent loop=$layout.parents}
    <li>
      {if ! $smarty.section.parent.last}
      <a href="{g->url arg1="view=core:ShowItem" arg2="itemId=`$layout.parents[parent].id`" arg3="highlightId=`$layout.parents[parent.index_next].id`"}">{$layout.parents[parent].title|default:$layout.parents[parent].pathComponent|markup}</a>
      {else}
      <a href="{g->url arg1="view=core:ShowItem" arg2="itemId=`$layout.parents[parent].id`" arg3="highlightId=`$layout.item.id`"}">{$layout.parents[parent].title|default:$layout.parents[parent].pathComponent|markup}</a>
      {/if}
    </li>
    {/section}
    <li>
      {$layout.item.title|default:$layout.item.pathComponent|markup}
    </li>
  </ul>

I just made the class of the first item (my home page) giBreadCrumbFirst and removed the ifs which could turn any other items into that class.

Cheers,

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-04-11 14:53

thanks, jbinto, but just a reminder for everyone that this is based on the old tpl/css..

 
haggis
haggis's picture

Joined: 2004-05-27
Posts: 17
Posted: Mon, 2005-04-11 16:47

Thanks jbinto, and also mindless,
but:
I grabbed the beta version, is there an even later version? I grabbed the beta only days ago!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-04-11 17:50

1 day for beta 2 and you can always the most up to date version, the daily snapshots, from http://galleryupdates.jpmullan.com