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  
 
   
phpbb speed

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB Forum
::  
Author Message
tweety
PR0
PR0


Joined: 24 Jan 2007
Posts: 94

phpbb speedPosted: Sun Aug 26, 2007 2:46 pm    Post subject: phpbb speed

i have many mods -most are only used by logged in members

can i speed up site for guests by setting conditions in php files, like the page header

example

if ( $userdata['session_logged_in'] )
{
MOD CODE GOES HERE
}

i am meaning code such as mod include files

is there any bad to doing this - i am not seeing?
Back to top
HB
phpBB SEO Team
phpBB SEO Team


Joined: 16 Oct 2006
Posts: 809

phpbb speedPosted: Sun Aug 26, 2007 3:25 pm    Post subject: Re: phpbb speed

tweety wrote:
is there any bad to doing this - i am not seeing?

I have several cases on my site where members have options that are not presented to guests, primarily for performance reasons (e.g., showing who's logged in today). As long as the content is unchanged, I see no harm in it. The key is not to present different content to search engine bots than guests. Google's quality guidelines elaborate on this point.

_________________
Dan Kehn
Back to top
Visit poster's website
tweety
PR0
PR0


Joined: 24 Jan 2007
Posts: 94

phpbb speedPosted: Mon Aug 27, 2007 12:10 pm    Post subject: Re: phpbb speed

thanks HB

is the code above what you would use
Back to top
HB
phpBB SEO Team
phpBB SEO Team


Joined: 16 Oct 2006
Posts: 809

phpbb speedPosted: Mon Aug 27, 2007 2:14 pm    Post subject: Re: phpbb speed

Yes, I would test for $userdata['session_logged_in'] in code (e.g., to skip a SQL query) and add BEGIN/END statements in the templates where necessary:

Code:
<!-- BEGIN switch_user_logged_in -->   
... HTML only shown to logged in users ...
<!-- END switch_user_logged_in -->   


<!-- BEGIN switch_user_logged_out -->   
... HTML only shown to guests ...
<!-- END switch_user_logged_out --> 

These switch variables are defined early in the template code and files like index_body.tpl use it.

_________________
Dan Kehn
Back to top
Visit poster's website
tweety
PR0
PR0


Joined: 24 Jan 2007
Posts: 94

phpbb speedPosted: Thu Aug 30, 2007 12:21 pm    Post subject: Re: phpbb speed

thanks HB
Back to top
tweety
PR0
PR0


Joined: 24 Jan 2007
Posts: 94

phpbb speedPosted: Thu Sep 27, 2007 1:43 pm    Post subject: Re: phpbb speed

HB which code did you obvious finding is good to make log in condition.
Back to top
HB
phpBB SEO Team
phpBB SEO Team


Joined: 16 Oct 2006
Posts: 809

phpbb speedPosted: Thu Sep 27, 2007 3:17 pm    Post subject: Re: phpbb speed

You mean what options are presented to logged in users that are not available to guests on my site?

If so, I have just a few. For example, the "related topics" list shown at the bottom of each thread. It's a costly SQL query, so at one time I limited it to logged in users. But later I changed it to show a limited number of related topics thinking that it may help SERPs (by showing links to related topics). Logged in users also see a list of who's logged in the last 24 hours. Skipping that for guests saves one query (and I personally I don't think guests have the right to know who's logged in today -- if they want to know, they should join).

There are a few other minor tweaks to the templates based on logged in state. For example, I don't bother showing the "jump to" section and access rights verbiage at the end of the page. I figure it lightens the page weight, which may please search engine. And besides, I'm less concerned about providing guests lots of navigation aids because long-time visitors will join anyway. For guests that come and go, a clean and fast site is more important than fancy navigation, IMO.

In the end, checking logged in status is about lowering the number of SQL calls necessary to show a page by showing the guests less "nice to have" information. Looking from another viewpoint, limiting guest features is also a way of "rewarding" those who join.

_________________
Dan Kehn
Back to top
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB Forum
Page 1 of 1

Navigation Similar Topics

Jump to: