We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

[Solution Available] custom header meta tags for sign-in page | Forum

JoshWho
JoshWho Jun 9 '15
Is there any way to modify the header section for the sign-in page?


I would like to add open graph to just that page and i do not see where it is calling for header info.

The Forum post is edited by Alia Jun 30 '15
Alia Team
Alia Jun 11 '15
File: ow_system_plugins/base/controllers/users.php
Function:  public function standardSignIn()
Try adding code after: 
OW::getDocument()->getMasterPage()->setTemplate(OW::getThemeManager()->.....

Following code structure in our software allows adding custom content into the head section:

For Page Titles:

OW::getDocument()->setTitle(OW::getLanguage()->text('prefix', 'custom_key'));

For Page Description:

OW::getDocument()->setDescription(OW::getLanguage()->text('prefix', 'custom_key'));

Try using OW::getDocument()->setDescription.

1. Add OW::getDocument()->setDescription(OW::getLanguage()->text('prefix', 'custom_key')); after the line specified earlier.

- replace 'prefix' with 'base'
- replace 'custom_key' with your unique key name. Ex: 'opengraph_for_signin_page'.

2. Save your changes.

3. Go to www.yoursitename.com/admin/dev-tools/languages and add your custom text key.
From first drop down  ( Section) you will need to select 'Base'.
Into the second input box (Key)  you will need to add opengraph_for_signin_page .
Into the third text area ( Text) you will need to enter your actual open graph code .

4. Click Add.

And you are done. Make sure to check whether this will work out or not for sign in page ( www.sitename.com/sign-in URL).


JoshWho
JoshWho Jun 12 '15
thanx. that is a longer version than what i did. I have it correctly displaying now. Is your step more of a permanent solution? 


I just edited the users file and added the meta lines i needed and it worked.

Alia Team
Alia Jun 22 '15
JoshWho,  my solution is more for multi-lingual websites.

Your solution will be passing one and the same description text no matter which language is active.

My solution allows adding translation for each language separately.

As server owner you can always edit your description with your source code in case you change the language. It is just easier to do so via Admin panel >> Settings >> Languages.

Overall my solution is more for admin's convinces in future. Not all Oxwall users are fond of editing source code very often.
JoshWho
JoshWho Jun 22 '15
I understand now.


Like a good 58% of my site is code edits to make everything work the way I want it. I'm use to working with the direct scripts then a cms like structure. Seems like there is a lot of stuff still missing from the admin panel to do most of the correct seo and css and java loads. It is a really good platform just needs some cleaning and optimizing. I expected that with a open source software.


Thanx for your help Allia.  :)