(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?
Posts: 27300
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
Posts: 117
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?
Posts: 27300
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
Posts: 117
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.
Posts: 27300
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
Posts: 117
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]
Posts: 27300
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
Posts: 117
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
Posts: 27300
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
Posts: 117
the question I asked before
Posts: 27300
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
Posts: 117
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.
Posts: 117
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
Posts: 27300
The original theme.tpl is like this:
change to:
post back when that is done. I have your urls from a PM.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 117
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
OR...change:
Posts: 27300
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
Posts: 117
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
Posts: 27300
Ok getting closer. Now I want you to change
to
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 117
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
Posts: 27300
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
Posts: 117
Thank you Dave, that would be great, let me know what you find
Posts: 117
I'm going through the copy I have on my harddrive to see code that could help, might be something in the core module
Posts: 27300
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
Posts: 117
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...
Posts: 117
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
Posts: 27300
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
Posts: 117
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...
Posts: 117
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
Posts: 27300
{g->url} was some test code so you can remove that.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 117
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!!
Posts: 27300
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
Posts: 117
ok I will try
Posts: 117
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
Posts: 27300
Sounds good to me! Thanks
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team