[MODDB] Custom Header Logo 1.2.7 (with bg and custom pages)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Get Involved
Locked
Jume
Registered User
Posts: 198
Joined: Tue Jun 22, 2004 9:29 am

Re: [RC] Custom Header Logo 1.2.1 (w/ custom header backgrounds)

Post by Jume »

Balint wrote: @Jume: you can define your default logo in the Styles --> Imageset --> Edit part where you can select "Main Logo" from the drop-down. From there you can disable the logo. As for the "whole background klickable" feature: it depends on your style, but in general you have to edit overall_header.html and move the <a href="">LOGO</a> part around your whole header. If you tell me which style you are using, I could help with specific instructions.
Thank you very much. I'm using the prosilver SE style and the search box is enabled. I tried some things out myself, but it didn't work. This is the part of the code from overall_header.html:

Code: Select all

        		<div class="headerbar">
        			<div class="inner"><span class="corners-top"><span></span></span>
					<div style="height: 129px;">
        			<div id="site-description">
        				<a href="{U_INDEX}" title="{L_INDEX}" id="logo">{SITE_LOGO_IMG}</a>
        				<p style="display: none;"><a href="#start_here">{L_SKIP}</a></p>
        			</div>
        
        		<!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH -->
        			<div id="search-box">
        				<form action="{U_SEARCH}" method="post" id="search">
        				<fieldset>
        					<input name="keywords" id="keywords" type="text" maxlength="128" title="{L_SEARCH_KEYWORDS}" class="inputbox search" value="<!-- IF SEARCH_WORDS-->{SEARCH_WORDS}<!-- ELSE -->{L_SEARCH_MINI}<!-- ENDIF -->" onclick="if(this.value=='{LA_SEARCH_MINI}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_MINI}';" /> 
        					<input class="button2" value="{L_SEARCH}" type="submit" /><br />
        					<a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH_ADV}</a> {S_SEARCH_HIDDEN_FIELDS}
        				</fieldset>
        				</form>
        			</div>
					</div>
        		<!-- ENDIF -->
        
        			<span class="corners-bottom"><span></span></span></div>
        		</div>
Thanks for telling me where to put the link code.

User avatar
Balint
Registered User
Posts: 952
Joined: Tue Aug 06, 2002 2:19 pm
Location: Germany
Contact:

Re: [RC] Custom Header Logo 1.2.1 (w/ custom header backgrounds)

Post by Balint »

Hi,

the difference between the method used here on phpbb.com and the prosilver SE is the lack of inline-elements on phpbb.com. In my opinion (and I tried this on the prosilver SE demo) there's no sane way to mimic the behavior of phpbb.com.


Greets,
Bálint

Jume
Registered User
Posts: 198
Joined: Tue Jun 22, 2004 9:29 am

Re: [RC] Custom Header Logo 1.2.1 (w/ custom header backgrounds)

Post by Jume »

You're probably right :(

Another thing: what about custom pages? How can one define which background they shall have?

User avatar
Balint
Registered User
Posts: 952
Joined: Tue Aug 06, 2002 2:19 pm
Location: Germany
Contact:

Re: [RC] Custom Header Logo 1.2.1 (w/ custom header backgrounds)

Post by Balint »

Hi,

same question came up on the "official" 1.0.x version thread. One solution is to build a custom ACP page with

Code: Select all

Name of the page	| Logo	| Background image
----------------------------------------------
faq					| 1.jpg	| faq_back.jpg
memberlist			| 2.jpg	| 
yourcustompage		| 		| customback.jpg
(although it's not pretty formated, you get the idea)

I'll try to code something like this this weekend. I hope.


Greets,
Bálint

User avatar
whoisit
Registered User
Posts: 283
Joined: Sat Feb 02, 2008 10:12 am

Re: [RC] Custom Header Logo 1.2.1 (w/ custom header backgrounds)

Post by whoisit »

Hi,

This Mod is working fine, the background image is different on two of the forums that I've tried it on, so I went ahead and tried adding the logo but it's not showing?

I have changed some things in the overall_header and I seem to remember removing the code for the site_logo.

Where does it go and what is the code to put it back so that it will show the logo.

Thanks
Graham

User avatar
Balint
Registered User
Posts: 952
Joined: Tue Aug 06, 2002 2:19 pm
Location: Germany
Contact:

Re: [RC] Custom Header Logo 1.2.1 (w/ custom header backgrounds)

Post by Balint »

Hi Graham,

the code would be

Code: Select all

{SITE_LOGO_IMG}

@all: The functionality for adding a logo to any page is written and works, I'm trying my luck on adding an ACP module to easily add, edit and remove logos and backgrounds for the pages.

User avatar
whoisit
Registered User
Posts: 283
Joined: Sat Feb 02, 2008 10:12 am

Re: [RC] Custom Header Logo 1.2.1 (w/ custom header backgrounds)

Post by whoisit »

Hi Balint

Thanks for the quick reply, I've got that working now but the logo is lower than the banner, how do I get them to be the same height from the top of the page?

Here's a link so you can get an idea
http://www.poem-n-verse.co.uk

Graham

User avatar
Balint
Registered User
Posts: 952
Joined: Tue Aug 06, 2002 2:19 pm
Location: Germany
Contact:

Re: [RC] Custom Header Logo 1.2.1 (w/ custom header backgrounds)

Post by Balint »

since this has nothing to do with the MOD functionality I'll just briefly point out the common.css in your styles theme directory. There you'll find the definition #logo where you can adjust the padding (the values represent the top, right, bottom and left values)


@all: the ACP module is working - adding, editing and deleting entries works like a charm.

User avatar
whoisit
Registered User
Posts: 283
Joined: Sat Feb 02, 2008 10:12 am

Re: [RC] Custom Header Logo 1.2.1 (w/ custom header backgrounds)

Post by whoisit »

Balint

Thanks for going the extra mile for me, I'll play about with common.css

Graham

User avatar
DoYouSpeakWak
Registered User
Posts: 2310
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Name: Hans Lassen
Contact:

Re: [RC] Custom Header Logo 1.2.1 (w/ custom header backgrounds)

Post by DoYouSpeakWak »

Got it working perfect.

In the overallheader there is a extra div if you add a max hight of the header. the IF menu part have to be put below that when using buttons menu.

Easy install. I would consider placing the logos and backgrounds folders in the image folder. Just empty. Its just easy to forget to create them. Thx for the great support, i hope i can hope others.
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid services. 10+ years of experience with phpBB3 and as System Administrator.

User avatar
Balint
Registered User
Posts: 952
Joined: Tue Aug 06, 2002 2:19 pm
Location: Germany
Contact:

Re: [RC] Custom Header Logo 1.2.1 (w/ custom header backgrounds)

Post by Balint »

After some developing and some testing with my friend AutoMOD I think it's safe to make a little test:

http://phpbb.krizsan.de/custom_header_logo_1.2.2.zip

Image

This is the new version with the shiny new admin-page for adding, editing and deleting logos and background images for any page in the forum root. I did not have the time to test this with MODs like nickvergessen's gallery which uses a subdirectory structure. But it'll work for pages like search, memberlist, faq, ucp (you get the idea).

To update from 1.2.1 please
  • copy all files accordingly (overwrite the language/en/mods/custom_header.php and add the others)
  • execute the first CREATE TABLE instruction (the ALTER and INSERT INTO instructions are the same)
  • make the changes in includes/constants.php
  • in includes/functions.php replace the first find/add before-block with the new one
  • in language/en/acp/common.php add the one line
and check the additional DIY instructions about the new module that needs to be added.
All the other instructions did not change from 1.2.1 to 1.2.2 so do not execute them twice!

This update is for the testers, but since this is "MODs in development", you are not using my MOD on a live board, am I right? Am I? :mrgreen:


Regards & thanks for testing,
Bálint

User avatar
DoYouSpeakWak
Registered User
Posts: 2310
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Name: Hans Lassen
Contact:

Re: [RC] Custom Header Logo 1.2.1 (w/ custom header backgrounds)

Post by DoYouSpeakWak »

Thx so much. Ill be testing this at once as soon as i can get the mysql running again. :)

found a few bugs. in the included files adm/styles should be adm/style

Acp module works fine as well. Draws the images from the right folders. But you cannot use A bold letter in the page name field. E.g Search wont work. search will.

Another problem i saw was using the mcp. Follow me here

Im at index
127.0.0.1/test3/index.php

Then i go to mcp by clicking it. (logo and background working)
127.0.0.1/test3/mcp.php?i=main&mode=front&sid=705b225edd215c57fd1a3e9a47ee518f

But if im in a forum. Let say
127.0.0.1/test3/viewforum.php?f=2

And then go to mcp
127.0.0.1/test3/mcp.php?f=2&i=main&mode=forum_view&sid=705b225edd215c57fd1a3e9a47ee518f

Then this mod doesnt show the choosen logo and header image. Just the standard phpbb3 one.
This update is for the testers, but since this is "MODs in development", you are not using my MOD on a live board, am I right? Am I?
No alot of users have the policy, "does it work and is support offered" then i will install on live board. No matter topic prefix. Personally i test each mod and make up my own mind if its stabile enough and if there are large improvement a head or not. This looks very smooth and promising so yes its gonna be installed.
More testing to be done.
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid services. 10+ years of experience with phpBB3 and as System Administrator.

femu
Registered User
Posts: 1070
Joined: Tue Sep 27, 2005 10:03 am

Re: [RC] Custom Header Logo 1.2.1 (w/ custom header backgrounds)

Post by femu »

DoYouSpeakWak wrote:Thx so much. Ill be testing this at once as soon as i can get the mysql running again. :)

found a few bugs. in the included files adm/styles should be adm/style
Correct.
DoYouSpeakWak wrote:Acp module works fine as well. Draws the images from the right folders. But you cannot use A bold letter in the page name field. E.g Search wont work. search will.

Another problem i saw was using the mcp. Follow me here
Cannot agree. Works fine on my site ;-)
DoYouSpeakWak wrote:No alot of users have the policy, "does it work and is support offered" then i will install on live board. No matter topic prefix. Personally i test each mod and make up my own mind if its stabile enough and if there are large improvement a head or not. This looks very smooth and promising so yes its gonna be installed.
More testing to be done.
I'm more the hardcore tester :mrgreen: I always first make a backup of the files, which I like to change. So if everything went wrong, I just copy the backup back ;) Therefore I don't have much problems in testing in live enviorement :lol:

To the structure. Would be really great to have subdirectories included, as NVs Gallery ist not the only one, which starts in a sub-directory! Would it matter, if I put a path in front? So i.e. gallery/gallery?
Regards, femu
_____________________________________________
[My development page] - [My normal homepage (German only)]

User avatar
Balint
Registered User
Posts: 952
Joined: Tue Aug 06, 2002 2:19 pm
Location: Germany
Contact:

Re: [RC] Custom Header Logo 1.2.1 (w/ custom header backgrounds)

Post by Balint »

Hi,

and thanks for the rapid testing.

1. The "adm/styles" error was corrected, download link updated

2. I also can add entries with capital letters

3. The mcp error is an interesting one because it's not really a bug but a feature :-)
The MOD checks for a request-variable named "f" first and assumes it's in a forum. Even you are in the MCP, you are in the MCP of this specific forum so if you would assign a logo/background to the mentioned forum the logo/background of the forum would show up. Just when the variable "f" is not set the logo/background of the specified page shows up. I can provide a small fix stating that the forum specific logos only apply when we are in a category, forum, thread or post.

4. @femu: I thought about your "external" link request and realized I don't understand it quite well. :oops: Can you give me an example (URL, click path, etc)?


Greets & Thanks again,
Bálint

femu
Registered User
Posts: 1070
Joined: Tue Sep 27, 2005 10:03 am

Re: [RC] Custom Header Logo 1.2.1 (w/ custom header backgrounds)

Post by femu »

Balint wrote: 4. @femu: I thought about your "external" link request and realized I don't understand it quite well. :oops: Can you give me an example (URL, click path, etc)?
That's why I put it in "" ;) What I meant with "external" links is simply, what you already started. So giving the chance to change the logo too, when calling another MOD. So don't get confused about my "external" links :-) So just the function outside of the forum though ;)

So just go ahead and check, if you can find a solution for calls within a sub directory like ie the Gallery.

Thanks very much,
femu
Regards, femu
_____________________________________________
[My development page] - [My normal homepage (German only)]

Locked

Return to “[3.0.x] MODs in Development”