phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
Help with inserting ads to my forum

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 Forum
::  
Author Message
Pisius



Joined: 22 Mar 2008
Posts: 20

Help with inserting ads to my forumPosted: Sun Mar 23, 2008 11:46 pm    Post subject: Help with inserting ads to my forum

I have another dilemma,i want to insert some javascript based ads in my forum, i would like to put some in top, somewhere around below header and some at the bottom of the page. ALso is it possible to insert adds in various places, for example between 2 forums,etc?

Thanks, any help will be appreciated Smile
Back to top
MathieuM.
phpBB SEO Team
phpBB SEO Team


Joined: 10 Feb 2008
Posts: 698
Location: Rhône-Alpes

Help with inserting ads to my forumPosted: Mon Mar 24, 2008 12:19 am    Post subject: Re: Help with inserting ads to my forum

Hi,

Give us more details about the JavaScript Wink
But it's possible to add them in the overall_header, under your logo image, and another one at the bottom of pages.

Then, to insert adds between 2 forums, without a MOD, don't think it's possible...


Mathieu.

_________________
[ Site phpBB SEO ] [ Téléchargements ] [ L'annuaire SEO ] [ Venez vous présenter ] [ Fonction Recherche ]
---------------------------
[ phpBB SEO Site ] [ Downloads ] [ SEO Directory ] [ Introduce yourself ] [ Search function ]
Back to top
Pisius



Joined: 22 Mar 2008
Posts: 20

Help with inserting ads to my forumPosted: Mon Mar 24, 2008 12:26 am    Post subject: Re: Help with inserting ads to my forum

it looks like this
Quote:
<center>
<script type='text/javascript'>
var sid = '0000';
var title_color = '000000';
var description_color = '646360';
var link_color = '000000';
var background_color = 'FFFFFF';
var border_color = '646360';
</script><a href='zxxxxx' style='display: none'>xxx</a><script type='text/javascript' src='xxxx'></script>
<a href='xxx' style='color: #000000; font-size: 14px' target='_blank'>xxx</a>
</center>


do i need to edit something or i can just instert it like that?
Back to top
HB
phpBB SEO Team
phpBB SEO Team


Joined: 16 Oct 2006
Posts: 829

Help with inserting ads to my forumPosted: Mon Mar 24, 2008 2:18 am    Post subject: Re: Help with inserting ads to my forum

See http://www.phpbb.com/kb/article/advertisements-in-phpbb3/

_________________
Dan Kehn
Back to top
Visit poster's website
MathieuM.
phpBB SEO Team
phpBB SEO Team


Joined: 10 Feb 2008
Posts: 698
Location: Rhône-Alpes

Help with inserting ads to my forumPosted: Mon Mar 24, 2008 10:12 am    Post subject: Re: Help with inserting ads to my forum

Hi,

If you want to add this Javascript in the header :

Code:
Find:

<!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN and (U_MCP or U_ACP) -->
      <div id="message" class="rules">
         <div class="inner"><span class="corners-top"><span></span></span>
            <strong>{L_INFORMATION}:</strong> {L_BOARD_DISABLED}
         <span class="corners-bottom"><span></span></span></div>
      </div>
      <!-- ENDIF -->

Before, add:

<center>
<script type='text/javascript'>
var sid = '0000';
var title_color = '000000';
var description_color = '646360';
var link_color = '000000';
var background_color = 'FFFFFF';
var border_color = '646360';
</script><a href='zxxxxx' style='display: none'>xxx</a><script type='text/javascript' src='xxxx'></script>
<a href='xxx' style='color: #000000; font-size: 14px' target='_blank'>xxx</a>
</center>

EoM


In the footer :

Code:
Find:

<div class="copyright">

After, add: (no <center> cause the class "copyright" is already centred)

<script type='text/javascript'>
var sid = '0000';
var title_color = '000000';
var description_color = '646360';
var link_color = '000000';
var background_color = 'FFFFFF';
var border_color = '646360';
</script><a href='zxxxxx' style='display: none'>xxx</a><script type='text/javascript' src='xxxx'></script>
<a href='xxx' style='color: #000000; font-size: 14px' target='_blank'>xxx</a>

EoM


No idea if your JS is ok, but it seems Wink
One more thing, the attribut target='_blank' isn't appreciate by the W3C Validator


Mathieu.

_________________
[ Site phpBB SEO ] [ Téléchargements ] [ L'annuaire SEO ] [ Venez vous présenter ] [ Fonction Recherche ]
---------------------------
[ phpBB SEO Site ] [ Downloads ] [ SEO Directory ] [ Introduce yourself ] [ Search function ]
Back to top
Pisius



Joined: 22 Mar 2008
Posts: 20

Help with inserting ads to my forumPosted: Mon Mar 24, 2008 3:47 pm    Post subject: Re: Help with inserting ads to my forum

Thanks a lot once more! Smile
Amm only one more question regarding this,is any way to change that target _blank to be W3 friendly? Confused
Thanks.
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

Help with inserting ads to my forumPosted: Mon Mar 24, 2008 4:45 pm    Post subject: Re: Help with inserting ads to my forum

It's usable in XHTML 1.0 transitional, but not in strict.

There is no real point to go for strict standard and use blank target, but you can still use some JS to do the trick.

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
Pisius



Joined: 22 Mar 2008
Posts: 20

Help with inserting ads to my forumPosted: Mon Mar 24, 2008 6:17 pm    Post subject: Re: Help with inserting ads to my forum

what u recon if i put this in .js file and load it with appropriate placement in <head> of the page would it work?

Quote:

function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "external")
anchor.target = "_blank";
}
}
window.onload = externalLinks;


and link would look something like in normal page <a rel=”external” href=”http:/xxxxxxx”>link</a>
Rolling Eyes


EDIT: Implemented and working Smile
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

Help with inserting ads to my forumPosted: Sat Mar 29, 2008 9:26 am    Post subject: Re: Help with inserting ads to my forum

Within phpBB3, you should use the standardized onload method, to make sure that all JS supposed to be loaded upon page load will, at the end of the <head> section in overall_header.html :

Code:
function externalLinks() {
   if (!document.getElementsByTagName) return;
   var anchors = document.getElementsByTagName("a");
   for (var i=0; i<anchors.length; i++) {
      var anchor = anchors[i];
      if (anchor.getAttribute("href") &&
         anchor.getAttribute("rel") == "external")
         anchor.target = "_blank";
      }
}
onload_functions.push('externalLinks()');


Wink

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 Forum
Page 1 of 1

Navigation Similar Topics

Jump to: