copyrights of MOD

General discussions Forum for everything that does not fit elswhere in the phpbb SEO forums.

Moderator: Moderators

copyrights of MOD

Postby Meis2M » Wed Mar 09, 2011 5:22 pm

Hi :byebye:

i create a mod and i like to add a copyrights in to this. i dont like edit the overal_footrer.html for adding copyright i need a way to add copyright in language.

i found this code in phpbb-seo mod

Code: Select all
   function seo_end($return = false) {
      global $user, $config;
      if (empty($this->seo_opt['copyrights']['title'])) {
         $this->seo_opt['copyrights']['title'] = strpos($config['default_lang'], 'fr') !== false  ?  'Optimisation du Référencement' : 'Search Engine Optimization';
      }
      if (empty($this->seo_opt['copyrights']['txt'])) {
         $this->seo_opt['copyrights']['txt'] = 'phpBB SEO';
      }
      if ($this->seo_opt['copyrights']['img']) {
         $output = '<br /><a href="http://www.phpbb-seo.com/" title="' . $this->seo_opt['copyrights']['title'] . '"><img src="' . $this->seo_path['phpbb_url'] . 'images/phpbb-seo.png" alt="' . $this->seo_opt['copyrights']['txt'] . '"/></a>';
      } else {
         $output = '<br /><a href="http://www.phpbb-seo.com/" title="' . $this->seo_opt['copyrights']['title'] . '">' . $this->seo_opt['copyrights']['txt'] . '</a>';
      }
      if ($return) {
         return $output;
      } else {
         $user->lang['TRANSLATION_INFO'] .= $output;
      }
      return;
   }


i need something like that to my work. so any body can help me how can add this function to my mod?
thank u very much
Meis2M
PR1
PR1
 
Posts: 164
Joined: Sat Aug 08, 2009 2:53 pm
Location: www.zohall.com

Advertisement

Re: copyrights of MOD

Postby dcz » Wed Mar 09, 2011 9:13 pm

As you can see, it's all a matter to happen some html to the $user->lang['TRANSLATION_INFO'] variable. This can be done where you like as long as user::lang is accessible (and loaded, eg after session started).
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21376
Joined: Fri Apr 28, 2006 9:03 pm

Re: copyrights of MOD

Postby Meis2M » Sat Mar 12, 2011 7:25 am

thank u for answer but i am not a professional MODer.

u think i create a file like copy.php and i will put that code in it. now how can add this function to my mod? and what files and code must edit?
Meis2M
PR1
PR1
 
Posts: 164
Joined: Sat Aug 08, 2009 2:53 pm
Location: www.zohall.com

Re: copyrights of MOD

Postby dcz » Sun Mar 13, 2011 12:30 pm

You just need to add something like :
Code: Select all
$user->lang['TRANSLATION_INFO'] .= "the href code of your copyright link";


somewhere in the code you add, must just be after the session has started, there is no need for a separate file.
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21376
Joined: Fri Apr 28, 2006 9:03 pm

Re: copyrights of MOD

Postby Meis2M » Mon Mar 14, 2011 8:18 am

dcz wrote:You just need to add something like :
Code: Select all
$user->lang['TRANSLATION_INFO'] .= "the href code of your copyright link";


somewhere in the code you add, must just be after the session has started, there is no need for a separate file.


a simple question
i must add this code in function.php file? :oops:
Meis2M
PR1
PR1
 
Posts: 164
Joined: Sat Aug 08, 2009 2:53 pm
Location: www.zohall.com

copyrights of MOD

Postby optiplex » Mon Mar 14, 2011 10:37 am

hi everybody.


Good post, thank you for sharing!!..
optiplex
 
Posts: 12
Joined: Tue Mar 01, 2011 1:33 pm

Re: copyrights of MOD

Postby dcz » Mon Mar 14, 2011 2:00 pm

Meis2M wrote:a simple question
i must add this code in function.php file? :oops:


Man, you are talking about adding this to a mod of yours, this implies that you have a minimum knowledge about what you are doing.
My point is you can add this code where you want (really), the only thing is to do it after the session started, eg most likely in a place where you already add your mod's code.
Just do not do it within a loop, there should be no need to open a new file in your mod's install to do so, but rather to add it in some existing edit that affects all pages once and for all (like in page_header() or within a function of yours called in page_header()).

Show us you mod if you want a more precise answer.
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21376
Joined: Fri Apr 28, 2006 9:03 pm

Re: copyrights of MOD

Postby Meis2M » Mon Mar 14, 2011 5:20 pm

you right :D

for some reason i sent a private message for u and attach with it my mod.

thank u :)
Meis2M
PR1
PR1
 
Posts: 164
Joined: Sat Aug 08, 2009 2:53 pm
Location: www.zohall.com

Re: copyrights of MOD

Postby thilak » Sat Jul 09, 2011 5:02 am

It is a nice sharing.........
thilak
 
Posts: 9
Joined: Mon Jul 04, 2011 6:02 am


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 64 guests