Author |
Message |
guidyy
Worker
![Worker Worker](modules/Forums/images/ranks/3stars.gif)
![](modules/Forums/images/avatars/Charlie_Brown/Charlie_Brown_-_The_Model.gif)
Joined: Nov 22, 2004
Posts: 208
Location: Italy
|
Posted:
Tue Jun 20, 2006 2:51 am |
|
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 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
Site Admin
![](modules/Forums/images/avatars/41f0b40a419280935f3a0.gif)
Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Tue Jun 20, 2006 4:33 am |
|
Please don't double post. |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
guidyy
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Jun 20, 2006 5:59 am |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Tue Jun 20, 2006 6:09 am |
|
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! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
guidyy
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Jun 20, 2006 10:23 am |
|
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... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
fkelly
Former Moderator in Good Standing
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY
|
Posted:
Tue Jun 20, 2006 1:38 pm |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Jun 21, 2006 6:44 am |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
fkelly
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Jun 21, 2006 7:43 am |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Jun 21, 2006 7:46 am |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
guidyy
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Jun 21, 2006 7:56 am |
|
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 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 22, 2006 5:30 am |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
guidyy
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 22, 2006 5:35 am |
|
I made it
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
will post my mods as soon as I am sure I did not screw up something else
Guido |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Thu Jun 22, 2006 5:56 am |
|
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 . |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
guidyy
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 22, 2006 6:17 am |
|
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 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 22, 2006 6:49 am |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 22, 2006 6:54 am |
|
guidyy, well, that was even easier than I thought! Way to go!!! |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
guidyy
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 22, 2006 7:23 am |
|
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 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 22, 2006 7:41 am |
|
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... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
guidyy
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 22, 2006 8:06 am |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 22, 2006 8:42 am |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
guidyy
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jun 23, 2006 12:12 am |
|
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\"> \n";
//blocks("left"); moved we put an empty cell first
echo "</td><td> </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> </td><td width=\"200\">\n";
// blocks("right"); Again we moved right blocks set by footer function and show an empty cell
echo " </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> </td>";
// center content is already set, sop we go directly to take care of right blocks
if (defined('INDEX_FILE')) {
echo "<td> </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 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|