Welcome, Guest
Username: Password: Remember me

TOPIC: Rmove Dolibarr from tittle and login header

Rmove Dolibarr from tittle and login header 1 year 10 months ago #21603

  • planpc
  • planpc's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 80
  • Karma: 0
Hello,

i will like to show something more personal in these places, is it possible?

Dolibarr 3.X.X version in the page tittle, and in the login screen.

Attached a few images for clarify.


Thank you

File Attachment:

File Name: captura036_2012_11_21_02_07_58.jpg
File Size: 9695
captura035_2012_11_21_02_07_47.jpg
The administrator has disabled public write access.

Re:Rmove Dolibarr from tittle and login header 1 year 10 months ago #21617

  • i.dannati
  • i.dannati's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 66
  • Karma: 2
This will change the login header

edit file

~/core/tpl/login.tpl.php

Edit line 86 to this

<tr class="vmenu"><td align="center"><?php echo "YOUR NEW INFO"; ?></td></tr>


to change the title (Page dependent)

In the same file
edit line 33
from

<title>'.$langs->trans('Login').' '.$title.'</title>'."\n";

to

<title>'.$langs->trans('Whatever You Want').' </title>'."\n";


The changes above will only change the login page... To change the title once in dolibarr I haven't figured out yet
The administrator has disabled public write access.

Re:Rmove Dolibarr from tittle and login header 1 year 10 months ago #21621

  • planpc
  • planpc's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 80
  • Karma: 0
Thanks a lot Kevin !! :woohoo:

I could been searching and never foud it, now is so easy.


Regards from Madrid
The administrator has disabled public write access.

Re:Rmove Dolibarr from tittle and login header 1 year 10 months ago #21622

  • i.dannati
  • i.dannati's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 66
  • Karma: 2
No Worries :)

I'll post here when I figure out how to change the title once your logged into Dolibarr
The administrator has disabled public write access.

Re:Rmove Dolibarr from tittle and login header 1 year 10 months ago #21630

  • humphrey
  • humphrey's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 169
  • Thank you received: 6
  • Karma: 14
Can't you make all that without digging in the code ?

Setup/Other setup :
. add the variable MAIN_APPLICATION_TITLE value is up yo what you want

Setup/Display :
. you can modify some parameters up to your needs

Rgds.
The administrator has disabled public write access.

Re:Rmove Dolibarr from tittle and login header 1 year 10 months ago #21631

  • i.dannati
  • i.dannati's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 66
  • Karma: 2
Very Awesome....

To be entirely honest I've only been messing with Dolibarr for about 3 weeks for a client...

I'm a little more accustomed to editing php directly vs edits within a system and being such you can change things like ('Login') to ('Welcome To') whereas edits within Dolibarr will only allow you to change system wide variables i.e (.$title.)

However your Other Setup trick for the Dolibarr title was brilliant!!! It saved me tons of time

What else can you do with Other Setup??
Last Edit: 1 year 10 months ago by i.dannati.
The administrator has disabled public write access.

Re:Rmove Dolibarr from tittle and login header 1 year 10 months ago #21632

  • planpc
  • planpc's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 80
  • Karma: 0
The solution provided by Kevin works perfectly, but maybe the code must be changed everytime you update to a new Dolibarr versión.



By the way humphrey, how do you get this variable?, i´ve been searching for all possible variables in the wiki with no success and I´m sure there must be many wich could help to personalize Dolibarr a lot.
The administrator has disabled public write access.

Re:Rmove Dolibarr from tittle and login header 1 year 10 months ago #21633

  • i.dannati
  • i.dannati's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 66
  • Karma: 2
Yeah I would imagine the code change would be lost after processing any update...

Don't get me wrong the variable setup within Dolibarr is definitely the way to go if you plan on keeping up with releases but it limits you to system wide changes

For instance I didn't like the "Connection" button on the login page so I changed it to "Login"

A variable I'm almost certain couldn't have been changed within Dolibarr

but thats me I guess.. I like to change little things like that throughout different systems for a more custom feel
The administrator has disabled public write access.

Re:Rmove Dolibarr from tittle and login header 1 year 10 months ago #21648

  • humphrey
  • humphrey's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 169
  • Thank you received: 6
  • Karma: 14
The variables list is available at the wiki page wiki.dolibarr.org/index.php/Setup_Other

i.dannati : you are only using Dolibarr for 3 weeks ???? I read you other posts and it looks like you already know quite a lot about Dolibarr, you are great ! that's amazing for me !!

I'm not a developer, just a regular user, sometimes I'd really love being able to understand and modify the PHP code for our needs... maybe in another life...

Anyway you're right that any modification will be lost after an upgrade, so it is quite difficult to restore the modifications after an upgrade, moreover that there are huge structure changes since 3.2.0

Regards.
The administrator has disabled public write access.

Re:Rmove Dolibarr from tittle and login header 1 year 10 months ago #21649

  • i.dannati
  • i.dannati's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 66
  • Karma: 2
Thank you Humphrey!

PHP coding can be very easy given the right tools...

A basic starting point is:

Firefox with firebug extension (This will help with css mainly but provides tools from tracing code down)

Textwrangler if you have a mac
Geany if you use linux
Not sure what for windows but search for alternatives in google..

Those apps will not only seriously help in coding but more importantly they provide easy access to tracing.. Lets say you want to find a particular code but have no idea what file to search

Simply search the entire document root with either of those applications

They will also allow you to compare one file to the next.. So if there is a update you can compare the 2 different files to determine if coding changes were made and where

A trick we developers use to keep track of changes is simply create a local folder and call it revisions

When you change any file you duplicate the file structure within revisions so revisions/core/menus/standard/eldy.lib.php (recent one I worked on)

this way you can keep track of every edit as well as tailoring a custom comment out code for yourself like //dannati above all your edits.. (makes searching for them in the future so much easier)

on a side note anyone who wants to learn in their spare time should visit codeacadamy.com its a great website to learn everything from the basics to more advanced programming.....

if you ever get stuck with any code no worries! Just send me a email This email address is being protected from spambots. You need JavaScript enabled to view it. and I'll do want I can to help!


Cheers!
The administrator has disabled public write access.
Time to create page: 0.089 seconds