multi site logos

Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Sat, 2008-07-26 18:04

(sorry accidently posted this in gallery 1 discussions)
on gallery 2.3

not quite understanding this

To use a different logo in each multisite install use a line in theme.tpl like this:

<img src="{g->url href="sitelogo.jpg" forceDirect=true}" alt=""/>
Then put a sitelogo.jpg file in each multisite directory.

If I have one codebase
and then branches only have index.main,config,embed,upgrade,lib,g2data

the only place I see the themes is in the g2data which is locked in httpd:httpd and once I change the permissions there's no turning back I can't relock the g2data to ^^

So where am I adding the above?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2008-07-27 05:58

Add <img src="{g->url href="sitelogo.jpg" forceDirect=true}" alt=""/> to the theme you are using.
Then in each multisite folder you add the sitelogo.jpg. In other words the same place as the files (index.php, main.php, embed.php, upgrade/index.php, lib/support/index.php) in the multisite directory.
Please update the docs so that others can understand as well.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Sun, 2008-07-27 17:51

I'm gonna assume you mean these phrases?

<img src="{g->url href="images/galleryLogo_sm.gif"}" width="107" height="48" alt=""/>
</div>
{g->theme include="progressbar.tpl"}
{else}
<div id="gsHeader">
<a href="{g->url}"><img src="{g->url href="images/galleryLogo_sm.gif"}"
width="107" height="48" alt=""/></a>

change to this:
<img src="{g->url href="sitelogo.jpg" forceDirect=true}" alt=""/>=matrix

Guess I still don't understand if I have 10 multi-sites, how can I change the one
Matrix theme's URL so it reflects all 10 different logos? I am only using one theme codebase?
You'd either have use a different theme on each site, or have a way for the one url to know to look for the alternative jpgs?

I don't mean to seem stupid but am I literally inserting *sitelogo.jpg* in the url? cause if not, then I'd only be able to put 1 multi-site url there? correct?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2008-07-27 18:10

Do you want to change the logo for all sites to have the same logo?
Are all sites using the same theme?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Sun, 2008-07-27 19:22

Do you want to change the logo for all sites to have the same logo?
yes
Are all sites using the same theme?
at present yes, but I'd like the option of being able to switch a theme whenever I want
and still retain the logo for that particular site.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2008-07-27 20:16
Quote:
Do you want to change the logo for all sites to have the same logo?
yes

Then why not just change the logo that the theme references; if you are using matrix it is:
gallery2/images/galleryLogo_sm.gif

No need to play with code to complicate things.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Sun, 2008-07-27 20:50

That's what I am doing right now, I just changed out the graphic for galleryLogo_sm.gif.
You can look the branch I haven't structured yet.

http://root.reiddust.com/branch5/main.php

But each branch has it's own purpose, and I was hoping to have a logo for each purpose. All the themes use the galleryLogo_sm.gif logo. If I can't, I can't..just be cool if I could.

[bad storm, may not answer for awhile]

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2008-07-27 21:27

Now you are confusing me because you said "Yes" when I asked: "Do you want to change the logo for all sites to have the same logo?"

But now you are saying; "But each branch has it's own purpose, and I was hoping to have a logo for each purpose."
So you want a different logo for each multi site?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Mon, 2008-07-28 03:56

sorry I misread that. I thought you asked if they all had the same logo now..

So you want a different logo for each multi site?

yes

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2008-07-28 13:40

Each multisite has its own directory, right?
Then put the logo you want in that directory.
then change the theme to point to that image:
<img src="{g->url href="sitelogo.jpg" forceDirect=true}" alt=""/>

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Mon, 2008-07-28 14:19

the question I asked before

Quote:
I don't mean to seem stupid but am I literally inserting *sitelogo.jpg* in the url?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2008-07-28 14:28

If sitelogo.jpg is the name of the image you want. You can change the name if you wish, but it will have to be the same name for each multisite. Each image in the multisite directory can be a different image but the same name.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Mon, 2008-07-28 16:38

yes! that's awesome! That's exactly what I needed to hear ( and understood it this time) ha :D
so if they all have the galleryLogo_sm.gif and the forcedirect=true will make them change to each multi-site

thanks so much for your patience Dave.

 
Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Mon, 2009-01-05 01:40

Hi Dave,
Happy New Year,
After much effort the method given to make separate logos for each multi-site does not appear to be working. Thanks for the help
B

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2009-01-05 02:20

The original theme.tpl is like this:

	{g->theme include="progressbar.tpl"}
      {else}
      <div id="gsHeader">
	<a href="{g->url}"><img src="{g->url href="images/galleryLogo_sm.gif"}"
	 width="107" height="48" alt=""/></a>
      </div>

change to:

	{g->theme include="progressbar.tpl"}
      {else}
      <div id="gsHeader">
	<a href="{g->url}"><img src="{g->url href="galleryLogo_sm.gif"}"
	 width="107" height="48" alt=""/></a>
      </div>

post back when that is done. I have your urls from a PM.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Mon, 2009-01-05 03:15

ok done. No change. I cleaned template cache aand database cache too.

All I can think of as a radical solution is to make the local folder with clones of martrix, and then point each separate clone to the different multisites 1-2-3 etc.

so it would look like

Quote:
<a href="{g->url}"><img src="{g->url href="/themes/local/multisite1/galleryLogo_sm.gif"}"
width="107" height="48" alt=""/></a>

OR...change:

Quote:
<a href="{g->="/images/galleryLogo_sm.gif}"><img src="{g->url href="/galleryLogo_sm.gif"}"
width="107" height="48" alt=""/></a>

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2009-01-05 03:47
Quote:
ok done. No change.

then you must be changing the wrong file. Your logo would not show up if the url to the image changed.
Put it in a local directory like the directions at the top of the file say.
turn off template caching as well.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Mon, 2009-01-05 04:46

I was changing the theme.tpl file. The top only deals with a single stand alone gallery not a multisite..

what about this? Has this been solved?

http://codex.gallery2.org/Talk:Gallery2:How_to_Add_Custom_Banner_or_Remove_Gallery_Logo

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2009-01-05 05:00

Ok getting closer. Now I want you to change

<img src="{g->url href="galleryLogo_sm.gif"}"
	 width="600" height="200" alt=""/></a>

to

<img src="/galleryLogo_sm.gif"
	 width="600" height="200" alt=""/></a>

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Mon, 2009-01-05 05:19

ok. this is what I have now:

<a href="{g->url}"><img src="galleryLogo_sm.gif"
width="600" height="200" alt=""/></a>

((*update the image is NOT working anymore (as you said it shouldn't))

have to go now, pick this up in the morning again
thanks Dave

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2009-01-05 05:33

Seems the behavior has changed for the baseurl in G2.3.
I will have to set up a multisite install and see if I can get it.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Mon, 2009-01-05 17:30

Thank you Dave, that would be great, let me know what you find

 
Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Tue, 2009-01-06 03:30

I'm going through the copy I have on my harddrive to see code that could help, might be something in the core module

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2009-01-06 03:44

I have been called out of town so only have this silly laptop ( no G2 files and poor hotel wirelesss connection )
try:

<img src="{g->url href="galleryLogo_sm.gif" forceDirect=true}"
	 width="107" height="48" alt=""/></a>

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Wed, 2009-01-07 03:27

Thanks Dave for the help, it didn't work..I did notice on the 2 multi-sites we picked, that the "locks" in the cache directory in both disappeared,(also the backups directory) and I got a platform error message when clicking on the thumbnails. Replacing the "locks" directory in the multisites solved the problem, and the full sized images returned...

 
Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Wed, 2009-01-07 05:44

Dave,
just to let you know, it is showing up on the other multi-sites we were not working on, and then on the other different logo,I uploaded a photo and as it was processing (the orange line) the logo was showing, but when it went back to the albums screen it was not. Also after you sign in, the logo does not show up,(red X) and after you sign out, it no longer shows up...so I think the last equation is correct...but something needs to be done to make it constant

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2009-01-10 15:01

I created a new multisite from:
http://www.langleycom.com/gallery2/main.php
to get this:
http://www.langleycom.com/gallery22/main.php

They both use the same theme with this change:

{g->theme include="progressbar.tpl"}
      {else}
      <div id="gsHeader">
	<a href="{g->url}">{g->url}<img src="{g->url href="galleryLogo_sm.gif" forceDirect=true}"
	 width="107" height="48" alt=""/></a>
      </div>

and I created 2 images:
http://www.langleycom.com/gallery2/galleryLogo_sm.gif
and
http://www.langleycom.com/gallery22/galleryLogo_sm.gif

So in other words it works for me.
perhaps you have template caching on
FAQ: How can I clear cached data?

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Sat, 2009-01-10 16:35

ok...I will try again,
Question, why do you have so many g->url?
<a href="{g->url}">{g->url}<img src="{g->url href="galleryLogo_sm.gif" forceDirect=true}"
width="107" height="48" alt=""/></a>

is that 2nd {g->url} needed?

Also where are you placing the 2nd logo in the multi-directory? I got hint of a image by making a image directory in the multi-site and putting the gallyLogo_sm.gif in it, where I got no image at all by placing it in the same place as the index.php/main.php/etc...

 
Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Sat, 2009-01-10 17:11

that above worked EXCEPT that that small main.php? shows up before the image? I'm gonna try tweek it, maybe make a image directory in the multi-site or something

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2009-01-10 22:40

{g->url} was some test code so you can remove that.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Sun, 2009-01-11 02:51

Dave,
Thank you so much for taking the time & patience to figure this out, the last code you gave (without the g->url) is correct, If you still have the 2 url's I gave you, you can see them. I added a 3rd logo and it changed to it, I am really happy, and think this issue can be stamped [SOLVED]
thank you!!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2009-01-11 07:16

Glad it is all sorted for you. Could you please update the documentation to reflect the findings. I fear that if I update the docs it will not be correct and will get criticized by others for not making them clear enough.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Tue, 2009-01-13 14:32
Quote:
Could you please update the documentation to reflect the findings.

ok I will try

 
Reiddust

Joined: 2006-05-27
Posts: 117
Posted: Tue, 2009-01-13 18:38

let me know if this is correct Dave

=== Multisite Logo ===

To use a different logo in each multisite install:

Prefix:
The logo needs to be the same name in every multisite
galleryLogo_sm.gif or whatever you choose to call it.
Logo should be all the same size. Gallery 2 themes directory "calls" the logo up, so they must
be reflective of that "call" The logo itself can be any image, as long as width/height are identical,
and name is indentical

1. Go To Gallery2/themes/matrix/templates/themes.tpl on your server

2. Open theme tpl for editting look for this code:
{elseif $theme.pageType == 'progressbar'}
<div id="gsHeader">

<img src="{g->url href="images/galleryLogo_sm.gif"}" width="107" height="48" alt=""/>
</div>

{g->theme include="progressbar.tpl"}
{else}
<div id="gsHeader">
<a href="{g->url}"><img src="{g->url href="galleryLogo_sm.gif" forceDirect=true}"
width="107" height="48" alt=""/></a>

</div>

3.Change the 2nd code sequence FROM:
<a href="{g->url}"><img src="{g->url href="galleryLogo_sm.gif"}"
width="107" height="48" alt=""/></a>

TO:
<a href="{g->url}"><img src="{g->url href="galleryLogo_sm.gif" forceDirect=true}"
width="107" height="48" alt=""/></a>

4. Adjust size to fit your new logo (alter width/height ratio)

4a. *Note* (First code is "calling" the logo. The 2nd code is directing that call
to the correct url)

5. Save.

6. Go to multisite 1,2,3 etc,
Add new logo to each in the main directory (index.php,main.php)
save.

7. Exit server, go to your Gallery multisite instalations.

8. Login, site admin, maintance, delete template cache. (Can also delete database cache)

9. Logout

*Note* Take the extra step and delete internet cache,sometimes the changes made
will not show up until that has been cleared.
Using IE:tools,internet options, delete browser/delete all/save

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2009-01-13 23:38

Sounds good to me! Thanks

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team