Support Forums


Go Back   68 Classifieds Forums > Help & Support > Modules / Plugins / Modifications

Notices

 
LinkBack Thread Tools Display Modes
Old 04-08-2008, 09:54 AM   #1
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,618
Rep Power: 40
seymourjames has a spectacular aura about
Default SEO - Optimization Of 68C

Hi,

I have one big on-page SEO problem that I would like to solve. Well 2 actually and I am done with my site and ready to promote it (phase 1) through normal means.

1. I have created a metatgs.tpl file which I include in my layout.tp file so I can change the title, description and keywords for most pages. However I am stuck trying to find a unique logical test for the main categories page and only that page. I am able to get all the sub categories to have unique titles, the features page, new listings, etc but not the main browse page itself. I have tried lots of things but I cannot get the syntax or the test.

I have this which works well for the sub catogries but my main categories page keeps defaulting the title tag to the http address and not something I would like to define explicitly - in my case a title like French Properties. Here is what I have already. I am seeking the syntax and variable of IFf test itself.

{if $SCRIPT_NAME == "/category.php"}
{foreach name=outer item=contact from=$breadcrumb}
{foreach item=item from=$contact}
{assign var=category value=$item|strip_tags}
{/foreach}
{/foreach}
<title>{$category}</title>
<meta name="Description" content="{$sitedescription}" />
<meta name="Keywords" content="{$sitekeywords}" />

{else}
..... further tests for other pages which render correctly
{/if}{/if}{/if}... {/if}



2. My second problem is that the SEO module works well but for pages I create using the page editor, it takes the ID number and makes a IDnumber.html . My question is how to get an address like frenchestateagents.html for a page like page/8.html. How can I assign the title of the page which I have changed successfully to be the URL or something more meaningful at least.


As a quick aside: we should make a big SEO thread. How to optimize 68 classifieds. What we should all be doing!!!!

Last edited by seymourjames; 05-06-2008 at 10:00 PM.
seymourjames is offline   Reply With Quote
Old 04-08-2008, 10:16 AM   #2
68 Evangelist & Developer
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,725
Rep Power: 50
Mike-N-Tosh is just really niceMike-N-Tosh is just really nice
Default

I'm no php programmer, however it seems as you're working with the variable $breadcrumb. When you view the browse categories page, there isn't a $breadcrumb. So perhaps you could start out your logic with something as simple as:
PHP Code:
{if empty($breadcrumb)}
set what you want here for just the browse categories page
{else}
your original code
{/if} 
Again, I'm not a php programmer.

-Mike
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified)
Sandbox (v3.1.10, v4.0.9, 4.1.5)
Visit My blog for tips, tricks, tutorials, reviews for 68 Classifieds as well as my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Old 04-08-2008, 10:46 AM   #3
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,618
Rep Power: 40
seymourjames has a spectacular aura about
Default SEO Category/Browse page

A star tip for changing the meta tags on pages like category and search. It works and does not make a mess anywhere else from what I can see so far. Important to place the test within the outer IF so not to effect the subcategories,

{if $SCRIPT_NAME == "/category.php"}
{if empty($breadcrumb)}
<title>French Properties For Sale</title>
<meta name="Description" content="property in france including properties in south france, south west france, west france, east france, north france, central france and corsica}" />
<meta name="Keywords" content="property south france,property south west france,property west france,property east france,property north france,property central france,property corsica,french,property,france" />
{else}
{foreach name=outer item=contact from=$breadcrumb}
{foreach item=item from=$contact}
{assign var=category value=$item|strip_tags}
{/foreach}
{/foreach}
<title>{$category}</title>
<meta name="Description" content="{$sitedescription}" />
<meta name="Keywords" content="{$sitekeywords}" />
{/if}



Now onto problem 2. On we go with my site for French Property.

Still a general SEO forum would be a good idea as we with 68C have specific needs!!!
seymourjames is offline   Reply With Quote
Old 04-09-2008, 07:47 AM   #4
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,618
Rep Power: 40
seymourjames has a spectacular aura about
Default SEO friendly pages

So the solution to better SEO friendly pages. If people want to do the same thing then this is how I did. It seems to work and perhaps it is obvious but it was not obvious for me. In the .htacess file leave it as it is but then create a new section for your more friendly URLs for the pages you have created with the page editor, your top-level categories page, featured and new pages. The only exception is you can delete or comment out the rewrite for the main categories page.

I tried modifying the standard top listings , featured new and the pages mod_rewrites by replacing my desired URLS but it never seemed to work so I let it do its thing and rewrote the URLs again below. For example, I tied replacing RewriteRule ^page/([0-9]+)\.html$ pages.php?page=$1 [NC] with RewriteRule ^property-in-france/([0-9]+)\.html$ pages.php?page=$1 [NC] but it fell over continually. Here is the code which seems to work.

#categories - I commented out the top level page but left the rest
#RewriteRule ^categories\.html$ category.php [NC]

RewriteRule ^categories/([0-9a-zA-Z_-]+)\.html$ category.php?cat=$1 [NC]
RewriteRule ^categories/([0-9a-zA-Z_-]+)/page/([0-9]+)\.html$ category.php?cat=$1&page=$2 [NC]

#cat sorting
RewriteRule ^categories/([0-9a-zA-Z_-]+)/sort/([0-9a-zA-Z_-]+)/order/(desc|asc)\.html$ category.php?cat=$1&sortfield=$2&sortorder=$3 [NC]
RewriteRule ^categories/([0-9a-zA-Z_-]+)/sort/([0-9a-zA-Z_-]+)/order/(desc|asc)/page/([0-9]+)\.html$ category.php?cat=$1&sortfield=$2&sortorder=$3&page =$4 [NC]

#pages
RewriteRule ^page/([0-9]+)\.html$ pages.php?page=$1 [NC]

#top lisitngs
RewriteRule ^listings/(featured|new|top)\.html$ toplistings.php?pg=$1 [NC]
RewriteRule ^listings/(featured|new|top)/([0-9]+)\.html$ toplistings.php?pg=$1&page=$2 [NC]

# MY CHANGES

# CHANGE THE MAIN CATEGORY URL

RewriteRule ^properties-france\.html$ category.php [NC]

# CHANGE THE FEATURED AND NEW LISTINGS URLs


RewriteRule ^french-properties\.html$ listings/featured.html [NC]
RewriteRule ^properties-in-france\.html$ listings/new.html [NC]

# CHANGE MY PAGES (URLS) CREATED WITH THE PAGE EDITOR

RewriteRule ^property-in-france\.html$ page/3.html [NC]
RewriteRule ^property-france\.html$ page/12.html [NC]
RewriteRule ^property-for-sale-france\.html$ page/8.html [NC]
RewriteRule ^mortgages-france\.html$ page/9.html [NC]
RewriteRule ^leasebacks-france\.html$ page/10.html [NC]

I hope this helps somebody else at the same phase of their development project. If anybody wants to pass comment on my site French Property then please do. We all need help
seymourjames is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick SEO optimization for showlistings civ v3.1 Modules & Modifications 2 01-03-2007 10:26 AM
Site optimization spaceboy Site Marketing 26 10-09-2006 03:35 AM


All times are GMT -4. The time now is 11:06 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0