Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes
Author Message
guidyy
Worker
Worker


Joined: Nov 22, 2004
Posts: 208
Location: Italy

PostPosted: Tue Jun 20, 2006 2:51 am Reply with quote

Hallo,
I need help for a new idea it came on my mind while looking at my competitors websites html code.

Only registered users can see links on this board! Get registered or login! you will see how php actually render the html content, and on the bottom the same content rendered in a different way.

If you look at the html of the second one, you will see that main content comes first, and blocks immediatly after.
this is a tremendous boost in Search engine optimization.

I tried to change my theme.php by myself with no luck.
Anyone willing to help?

My default theme is "Sunset"
but the same thing for fisubice would be great as well
Guido
 
View user's profile Send private message Visit poster's website MSN Messenger
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6383

PostPosted: Tue Jun 20, 2006 4:33 am Reply with quote

Please don't double post.

_________________
I google, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
guidyy
PostPosted: Tue Jun 20, 2006 5:59 am Reply with quote

kguske wrote:
Please don't double post.


just for the record..... Only registered users can see links on this board! Get registered or login!
 
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9449
Location: Arizona

PostPosted: Tue Jun 20, 2006 6:09 am Reply with quote

guidyy, while I do not have time to code this for you, something that came to mind is instead using a combination of DIV tags and CSS to "float" the columns where you want them. There is a good book by Dan Cederholm called "Bulletproof Web Design" that discussed this concept very well in case you are interested.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
guidyy
PostPosted: Tue Jun 20, 2006 10:23 am Reply with quote

I wish i could!
The perversion of standard php theme layout is over my programming skills...

It first generate the left block, then the footer, then (if defined) the right blocks
Why in the hell the footer controls center content and right blocks?
I think I give up...
 
fkelly
Former Moderator in Good Standing


Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Tue Jun 20, 2006 1:38 pm Reply with quote

I have no idea how this would work out in practice but you could try going into administration, blocks, and put the block you want to have first in the left column at the top.

Other than that there is a forum category here for hiring assistance and you could post there. There are people who are skilled at coding themes and maybe one could help.

There are probably other ways to improve search engine tracking of your site, if that's your true objective. Meta tags do that I believe. I'm no expert on that subject since I actually spend a fair amount of time trying to keep the search engines off my site but there are postings all around that you can read or google the topic.
 
View user's profile Send private message Visit poster's website
montego
PostPosted: Wed Jun 21, 2006 6:44 am Reply with quote

Unfortunately, I believe only a recoding of the theme will work. I am pretty sure most themes "wrap" the content (what is between the header and footer) in a three column table (could be more if they are using additional columns for graphics and / or separation). This means that ALL the left blocks would come first in the textual site scan, followed by the center blocks/content, followed by the right blocks.
 
fkelly
PostPosted: Wed Jun 21, 2006 7:43 am Reply with quote

True Montego and I agree that the best solution would be to recode the theme. It may be the only solution. However, there is more flexibility in blocks administration than most people realize. I just hacked my localhost system to stick the content block at the top left column (above where most sites keep the modules). So reading the view source it would appear right below the header in sequence. I also tried putting the last five articles block there and that works okay. Both the content blocks and last five articles are only links to the real content and articles but they do appear first on the page when set up that way. I don't have time to fool with it right now but it occurs to me that if you put nothing in the left block and suppressed your messages and had news appearing first in the center block it might do exactly what guiddy wants.

Oh heck, who wants to ride anyway? I just did it and it works fine. Just deactivate or move all the left blocks to the right or center, and suppress any messages and stick news in home and there it will be taking up the screen right below the header. You can basically achieve a two column layout with your navigation on the right and content in the left=center column.
 
montego
PostPosted: Wed Jun 21, 2006 7:46 am Reply with quote

fkelly, but what guidyy is wanting is for the center section content to come first in the textual scan of the site's HTML. This is what would help with search engine "relevance". But, the "kicker" is that he still wants the site to look the same visually. This can be done, however, only with a theme re-code... that is my point.
 
guidyy
PostPosted: Wed Jun 21, 2006 7:56 am Reply with quote

Exactly!
Montego, that what I was thinking: the standard layout is 3 (or 5 with spacing) columns, so I though it would be easy to add empty cell over the blocks columns and rowspan the center content.
Unfortunately the center content and right blocks are "pervertedly" governed by the themefooter() function...
I do not have the ability to rewrite the whole thing.
Guido
 
montego
PostPosted: Thu Jun 22, 2006 5:30 am Reply with quote

It is definitely something that I want to do some day, but to be quite honest, I just do not have the time, otherwise, I would have done it already. Sorry.
 
guidyy
PostPosted: Thu Jun 22, 2006 5:35 am Reply with quote

I made it Very Happy
You can check my site and see the result.
I hope having the content on top of the code will give me a boost.... and better targeted ads Wink
will post my mods as soon as I am sure I did not screw up something else Very Happy
Guido
 
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6792
Location: Ha Noi, Viet Nam

PostPosted: Thu Jun 22, 2006 5:56 am Reply with quote

As an alternative you could code a completely seperate theme then use some useragent detection to set the theme value or simple NOT display specific parts of the site depending on the useragent or if is_anonymous .
 
View user's profile Send private message Send e-mail
guidyy
PostPosted: Thu Jun 22, 2006 6:17 am Reply with quote

Hummm...
feeding different content to search engines and to humans is not a so wise idea..
It might end up in penalty for "cloacking"
Guido
 
Guardian2003
PostPosted: Thu Jun 22, 2006 6:49 am Reply with quote

But you wouldnt be serving 'different' content, merely 'removing' or 're-ordering'content that was worthless or not needed in order to optimise the content that was displayed. The same effect could be achieved by methods already posted here.
The links and text that a bot finds would still be valid regardless of what 'theme' was used (with the exception of images which they shouldn't be crawling anyway).

So for example, the block-modules.php, that hides links based on whether the visiter is logged in or not, the block-login.php displays more data when the visitor is anonymous than when the visitor is logged in etc.........

I found this thread very interesting so just wanted to throw a different ingredient into the recipe, another persepctive if you will.
In an ideal word, we shouldn't be displaying anything to 'anonymous' (other than log-in/register links) that is not pure content.

There was some discussion a while ago pertaining to forums for example; does a search engine need to see links to 'reply to topic', 'quote topic', 'new topic' etc and do we even need to waste bandwidth displaying some of those related images to 'anonymous'.
Food for thought definitely.
 
montego
PostPosted: Thu Jun 22, 2006 6:54 am Reply with quote

guidyy, well, that was even easier than I thought! Way to go!!!
 
guidyy
PostPosted: Thu Jun 22, 2006 7:23 am Reply with quote

Guardian, I understand your point.
Actually I use sommaire parametrable to show/hide some content to anonymous (included search engines)
But if you take the weblink or downloads module or comments in reviews as example, you see that there are some links-to-actions that search engine and non members should not care of...
For the good robots the easyest way is to kick them off via robots.txt:
to make it short, I did mod_rewrite only the links i want to feed to google and Co, and in robots.txt I tell them that modules.php is none of their business...
The bad bots go into .htaccess LOL
About anonymous, unless you want to recode everything with is_user($user) check everywhere feeding a different theme according to useragent is a drop of water into the ocean .....
Guido
 
montego
PostPosted: Thu Jun 22, 2006 7:41 am Reply with quote

Well, I think this needs to go a step further because you may not want to really eliminate functionality for legitimate anonymous users (not bots). Unfortunately, that greatly complicates things... Sure wish there was a sure-fire way to identify a true "bot" from a "human" without having to require registration...
 
guidyy
PostPosted: Thu Jun 22, 2006 8:06 am Reply with quote

that's a point too.
but every site, even if based on phpnuke, offers different features, and has different goals, and (thanks God) different look.
To accomplish everyones needs you would have to completely re-think the whole project, not only a layout.
 
Guardian2003
PostPosted: Thu Jun 22, 2006 8:42 am Reply with quote

I agree, you wouldn't want to use is_user or is_subscribed or is_paid etc on every single thing. It would get a little tiresome.
 
guidyy
PostPosted: Fri Jun 23, 2006 12:12 am Reply with quote

Ok here is the code: this is based on sunset theme, but I am quite sure it works with every other
I'm still working on a version for themes with html templates.

Changes applied to theme.php

Code:


echo "$public_msg<br>";

/************************************/
/*           begin guido's mods                     */
/*           http://www.yummyfood.net         */
/************************************/

/*start rendering content: */
echo "<table align=\"center\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"140\">&nbsp;\n";
//blocks("left");  moved  we put an empty cell first
echo "</td><td>&nbsp;</td><td rowspan=\"2\" valign=top width=\"100%\"><br>\n\n\n"; // we span the center content in two rows
}
// now we need to call  themefooter twice:  the first call is to render the center content
function themefooter() {
    if (defined('INDEX_FILE')) {
    echo "</td><td>&nbsp;</td><td  width=\"200\">\n";
//    blocks("right");  Again we moved right blocks set by footer function and show an empty cell
        echo "&nbsp;</td>";
    }
     echo "</tr>";  // we close the first row of the table

// now we need to display left and right blocks: open a new row
    echo "<tr><td valign=\"top\">";
   blocks("left");
    echo"</td><td>&nbsp;</td>";
// center content is already  set, sop we go directly to take care of right blocks
   if (defined('INDEX_FILE')) {

    echo "<td>&nbsp;</td><td valign=\"top\" width=\"200\">\n";
 blocks("right");
 echo"</td>";
 }
// in any case, we close the line and the table
 echo"</tr></table>";
//  display the footer.
    footmsg();
}


If you are going to use this code a backlink to my site would be appreciated.

Ciao, Guido
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©