Add one more short text item in layout

For support and discussion related to templates, themes, and imagesets in phpBB 3.0.
Scam Warning
Locked
jonathandoyle
Registered User
Posts: 36
Joined: Tue Mar 17, 2015 10:07 am

Add one more short text item in layout

Post by jonathandoyle » Thu Feb 25, 2016 4:36 pm

I want to make a minor change to my phpBB forum's display : I would like to display a subtitle below the main title in the header part of the index page (in the final html source page, this would be in the div called "logodesc").

Is this a simple thing to achieve ? Perhaps I could add a key/value item inside $template.
I do not really understand how and where the title string gets embedded in the final markup. All I know is that this is done inside the page_header function from functions.php.

Any help appreciated.

User avatar
Lumpy Burgertushie
Registered User
Posts: 66326
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Add one more short text item in layout

Post by Lumpy Burgertushie » Thu Feb 25, 2016 4:47 pm

we need more info. first, what version of phpbb are you running?
if 3.0 then you would edit the overall_header.html fle for whatever style(s) you are using.

if 3.1 then it is best to either request an extension or create a child style to make your changes to .

also, exactly what you want to add and exactly where ( links/screenshots etc. ) you want to add it would help us help you.

also, why can't you just add your text to the site description field in the admin panel?


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

jonathandoyle
Registered User
Posts: 36
Joined: Tue Mar 17, 2015 10:07 am

Re: Add one more short text item in layout

Post by jonathandoyle » Thu Feb 25, 2016 4:57 pm

Thank you for your quick answer.
Lumpy Burgertushie wrote:we need more info. first, what version of phpbb are you running?
I'm using version 3.0.12.
Lumpy Burgertushie wrote:if 3.0 then you would edit the overall_header.html fle for whatever style(s) you are using.
Ok, I'll have a look at that file.
Lumpy Burgertushie wrote:why can't you just add your text to the site description field in the admin panel?
It's supposed to be the first thing the users see when they go to the forum, not just the admins. Hopefully that'll be clearer when I have posted the screenshots, which I'll do soon.

jonathandoyle
Registered User
Posts: 36
Joined: Tue Mar 17, 2015 10:07 am

Re: Add one more short text item in layout

Post by jonathandoyle » Thu Feb 25, 2016 5:22 pm

So here are the screenshots :

Here is the current display of the forum's header :
Image

And here is what I want :

Image

jonathandoyle
Registered User
Posts: 36
Joined: Tue Mar 17, 2015 10:07 am

Re: Add one more short text item in layout

Post by jonathandoyle » Thu Feb 25, 2016 5:24 pm

The images won't display in my post above, I wonder why

User avatar
Lumpy Burgertushie
Registered User
Posts: 66326
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Add one more short text item in layout

Post by Lumpy Burgertushie » Thu Feb 25, 2016 5:46 pm

not sure I understand the reference to admins seeing it versus visitors. anything you put in the box for the site description shows up on the page for everyone to see.

test it.

go to the admin panel, board settings page/ site description box. put whatevedr you want in there.
submit. go to your board page and you will see whatever you put in that box.

If you do need to actually add something to do the code.

download( using ftp ) styles/yourstyle/template/overall_header.html file to your computer.

using a real text editor only, open the file and find this:

Code: Select all

<p>{SITE_DESCRIPTION}</p>
after it add your new text like this:

Code: Select all

<p>Your new line of text</p>
save the file. upload back to the server where it came from.

admin panel/main page: click the button that says purge the cache.

go to your board page, refresh your browser if you do not see the change.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

jonathandoyle
Registered User
Posts: 36
Joined: Tue Mar 17, 2015 10:07 am

Re: Add one more short text item in layout

Post by jonathandoyle » Fri Feb 26, 2016 12:42 pm

Thanks for your help again.

It almost works now, except that my subtitle is not parsed as HTML but just printed "as is".

I wrote this :

Code: Select all

<td width="100%" align="center">
<h1>{SITENAME}</h1><span class="gen">
<p style="font-size:3cm">  &#x05DE;&#x05B4;&#x05D9;&#x05DB;&#x05B8;&#x05D0;&#x05B5;&#x05DC; </p></span></td>
And the output goes

&?x05DE;&?x05B4;&?x05D9;&?x05DB;&?x05B8;&?x05D0;&?x05B5;&?x05DC;

How do I tell phpBB to read this bit as HTML ?

User avatar
AmigoJack
Registered User
Posts: 5588
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Add one more short text item in layout

Post by AmigoJack » Fri Feb 26, 2016 1:13 pm

jonathandoyle wrote:I wrote this :

Code: Select all

&#x05DE;
And the output goes

&?x05DE;

How do I tell phpBB to read this bit as HTML ?
Well, it's not the same.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

jonathandoyle
Registered User
Posts: 36
Joined: Tue Mar 17, 2015 10:07 am

Re: Add one more short text item in layout

Post by jonathandoyle » Fri Feb 26, 2016 1:26 pm

AmigoJack wrote:
jonathandoyle wrote:I wrote this :

Code: Select all

&#x05DE;
And the output goes

&?x05DE;

How do I tell phpBB to read this bit as HTML ?
Well, it's not the same.
What do you mean ? Obviously, the browser read this as non-html text, except that it didn't recognize the '#' character, so it put a '?' instead

User avatar
AmigoJack
Registered User
Posts: 5588
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Add one more short text item in layout

Post by AmigoJack » Sun Feb 28, 2016 12:15 am

phpBB's template engine doesn't evaluate HTML entities, thus it neither escapes, nor corrupts them. Link to a living example and I can tell you if it's really a hash sign (#) or a wild Unicode character which happens to look the same. Or if you might have used an improper editor.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

User avatar
Arty
Former Team Member
Posts: 16654
Joined: Wed Mar 06, 2002 2:36 pm
Name: Vjacheslav Trushkin
Contact:

Re: Add one more short text item in layout

Post by Arty » Sun Feb 28, 2016 7:43 am

As AmigoJack said, it is problem with your editor. phpBB does not change anything. You've used bad editor that tried to "fix" things, only to mess it up.

Use different editor to edit templates such as SublimeText.
Vjacheslav Trushkin / Arty.
Free phpBB 3.1 styles | New project: Iconify - modern SVG framework

Locked

Return to “[3.0.x] Styles Support & Discussion”