Support Forums


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

Notices

 
LinkBack Thread Tools Display Modes
Old 06-05-2008, 11:53 AM   #1
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,432
Rep Power: 36
seymourjames has a spectacular aura about
Default Calling URLs with title tags.

Does anybody know or have a solution so that URLs can be 'preprocessed' to assign a title tag at the time and un the place from which they are called. I am thinking here about the showlistings.tpl and breadcrumbs.tpl files especially. These files call URLs without title tags. I would like to assign title tags particularly to the pagination URLs and the breadcrumbs. I can do it for the actual listings themselves and the categories already but it is clumsy. There must be a more generic way that all URLs have a unique title tag the moment they are created which can be tested for in advance.

Including title tags into the headers of all URLs is relatively easy but that is not the same question - hope that is clear.
seymourjames is offline   Reply With Quote
Old 06-05-2008, 12:31 PM   #2
Coder
 
Join Date: Mar 2006
Posts: 4,692
Rep Power: 114
Lhotch is a glorious beacon of lightLhotch is a glorious beacon of lightLhotch is a glorious beacon of light
Default

Quote:
Originally Posted by seymourjames View Post
Does anybody know or have a solution so that URLs can be 'preprocessed' to assign a title tag at the time and un the place from which they are called. I am thinking here about the showlistings.tpl and breadcrumbs.tpl files especially. These files call URLs without title tags. I would like to assign title tags particularly to the pagination URLs and the breadcrumbs. I can do it for the actual listings themselves and the categories already but it is clumsy. There must be a more generic way that all URLs have a unique title tag the moment they are created which can be tested for in advance.

Including title tags into the headers of all URLs is relatively easy but that is not the same question - hope that is clear.
Im not sure I am following you. If I select a category, then select a peice of the breadcrumb, my page has a title that matches the category I am in. If I view a category the title is the category.
__________________
Larry

What I post here should be used only as a guide to point you in the right direction. If the code I post doesnt make any sense or work as posted then you should spend more time reading the various manuals and tutorials so it does make sense and you can tweak it to work. A sure fire way to get yourself in trouble is to implement changes you dont have an intimate understanding of. Im happy to help, but I am not here to teach you to code or create your site for you.
Lhotch is offline   Reply With Quote
Old 06-05-2008, 01:27 PM   #3
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,432
Rep Power: 36
seymourjames has a spectacular aura about
Default

One part of the SEO puzzle but an important part. Perhaps I am not explaining well.

I do not see how one can can call the URL of a breadcrumb with a title tag by modifying breadcrumbs.tpl for example


<p class="breadcrumb">
<a href="category.php" title="French Properties For Sale" class="breadcrumb">{$smarty.const.LANG_BROWSE_CATE GORIES}</a>
{foreach from=$breadcrumb item="entry"}
{$smarty.const.LANG_CAT_SEPERATOR} {$entry}
{/foreach}
</p>

The {$entry} gives the link <a href = "URL">category name<a>. It does not generate or I cannot see how to modify it efficiently to the form <a href = "URL" title = "category title text">category name<a>.

The more difficult problem afterwards is that in showlistings.tpl, pagination is not using title tags either when calling URLs. In this case, it would be effective to know at the point of calling a URL whether it is a case of New, Featured, Category or More seller ads. It then becomes potentially possible to assign a correct title tag when the URL is being called.

e.g <td class="paginationNum"><a href="{$file}?{$first}">{$smarty.const.LANG_FIRST} </a></td>


Testing whether one is about to show a New, Featured, ... URL is what I am trying to achieve. I can then do something like

<td class="paginationNum"><a href="{$file}?{$first}" title ="New French Properties - page 1">{$smarty.const.LANG_FIRST}</a></td> or

<td class="paginationNum"><a href="{$file}?{$first}" title ="Featured French Properties - page 1">{$smarty.const.LANG_FIRST}</a></td>

etc

Basically, I have defined a large metatags file which gets included in the layout.tpl file so that every page created has unique title, description and keywords. With the SEO module this all comes together very nicely. All works brilliantly. However, I wish to call all URLs with a title tag. I have solved that problem for all possible URLs except those described above in showlistings.tpl file (pagination part) and effectively the breadcrumbs.tpl file.

Hope that makes more sense.
seymourjames is offline   Reply With Quote
Old 06-05-2008, 01:59 PM   #4
Coder
 
Join Date: Mar 2006
Posts: 4,692
Rep Power: 114
Lhotch is a glorious beacon of lightLhotch is a glorious beacon of lightLhotch is a glorious beacon of light
Default

Im still not following what it is you are looking to do.

Are you referring to the link itself (ie the actual breadcrumb) and not the page it brings you to? When you click on a breadcrumb or a pagination number the destination page does have a title.

Instead of telling me what you see, maybe you can explaine what it is you want to accomplish.
__________________
Larry

What I post here should be used only as a guide to point you in the right direction. If the code I post doesnt make any sense or work as posted then you should spend more time reading the various manuals and tutorials so it does make sense and you can tweak it to work. A sure fire way to get yourself in trouble is to implement changes you dont have an intimate understanding of. Im happy to help, but I am not here to teach you to code or create your site for you.
Lhotch is offline   Reply With Quote
Old 06-05-2008, 02:04 PM   #5
The Master
 
Maffo's Avatar
 
Join Date: Mar 2006
Location: British in Argentina
Posts: 1,400
Rep Power: 46
Maffo is just really niceMaffo is just really nice
Default

I use this on all sites I build and indeed is a very good practice.

You must be careful not to spam these link titles. Having French Properties within 20,30,40 links within one page might be deemed as spam.

showlistings.tpl
PHP Code:
{foreach from=$pageNumber item="entry"}
                {if 
$entry.number==$pageNum}
                <
td class="paginationNum"><strong>{$entry.number}</strong></td>
                {else}
                <
td class="paginationNum"><a href="{$file}?{$entry.link}" title="Your Title - Page {$entry.number}" class="paginationNum">{$entry.number}</a></td>
                {/if}
            {/foreach} 

classes/kernel/categories.php
PHP Code:
function breadcrumb($node,$lev
    {
        global 
$db;
        
$sSQL="SELECT id,name,slug,parent_id,cLink FROM ".PREFIX."categories WHERE id='".$node."'";
        
$result=$db->query($sSQL);
        
$row=$result->fetch();
        
$path = array();
        
$link="";
        if(
$row['cLink']<>"")
        {
            
$link=$row['cLink'];    
        }
        if(
$link=="")
        {
            
$slug = ( empty($row['slug']) ) ? $row['id']: $row['slug'];
            
$link="category.php?cat=".$slug;
        }
        
$path[] = "<a title='".$row['name']."' href='".$link.'" class='breadcrumb'>".safeStripSlashes(htmlspecialchars($row['name']))."</a>";
        if ($row['
parent_id']!=0) 
        {
            $path = array_merge($this->breadcrumb($row['
parent_id],$lev+1), $path);
        }
        return 
$path;
    } 
__________________
**Bulk Upload System** has been upgraded. Works on all v4 versions with new functionality. Free upgrade for existing customers.
Maffo is offline   Reply With Quote
Old 06-05-2008, 04:16 PM   #6
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,432
Rep Power: 36
seymourjames has a spectacular aura about
Default

Thanks Maffo. You understand what I am banging on about and the risks. Basically, good SEO practice (on page) is to call URLS with a title tag and not just the URL in its naked form. I will take a close look at your code. It may well be just the ticket.

The overall solution for 68C is perhaps a difficult one but a future version may wish to adopt the same type of approach as some of the better content management systems like Expression Engine. URLs are not alone. They are like a pair. An address and a title tag. Used wisely (not like spam) it shows google that your site is compliant in terms of its internal linking structure.
seymourjames is offline   Reply With Quote
Old 06-05-2008, 04:32 PM   #7
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,432
Rep Power: 36
seymourjames has a spectacular aura about
Default

Maffo you really hit the nail on the head as I looked at your reply for the 3rd time. Is it better to not have title tags where the number of pages in showlistings could grow to hundreds of pages or is it better to be compliant and use title tags every time. Can't think of a better word to use than "compliant".

I have made all pages that I wish google to index be html pages and used unique title tags and descriptions for every page (even if the variation is just a number). I have set my robots file to exclude all php pages (generated by search) and pages behind the login (no follow and robots exclusion). The exception being search based on user listings where I made it list html pages with unique bla bla.

I am just struggling with my designer version to resolve the showlisitings pagination and the breadcrumb. All the rest is tight. Perhaps it may be best to leave the pagination be (do not want to be seen as spamming). However I would like to implement the breadcrumb title tags - is this possible with the designer version?

You know Maffo - why don't you lead a big SEO thread on the forum? You told me that you did this job before (providing Eric is o.k with it). For many it is the difference between success with 68C and failure.

Last edited by seymourjames; 06-05-2008 at 07:21 PM. Reason: ask a further question
seymourjames is offline   Reply With Quote
Old 06-18-2008, 07:00 AM   #8
Senior Member
 
CHRD's Avatar
 
Join Date: Nov 2006
Posts: 190
Rep Power: 15
CHRD is on a distinguished road
Default

There's nothing wrong with pages made by php search results, as long you can give the bot new content, php search result pages pay my �800pm mortgage
__________________
Costa del Sol
Spain
v3.1.10 Dev
V4.09 Dev sweeeet
�Powerful you have become, the dark side I sense in you.�
CHRD is offline   Reply With Quote
Old 06-18-2008, 08:53 PM   #9
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,432
Rep Power: 36
seymourjames has a spectacular aura about
Default

And that is a good point - sufficiently new content. If there is a lot of turnover and variety - yes o.k. but if many pages come out almost the same and things are in easily identifiable blocks and just moved about on a page, I think problems will arise. It is like what Maffo was saying - title tags on pagination is a good idea but be careful. A few pages yes but 30 or 40 links on a page with almost identical title tags looks like spamming - asking for trouble. I think one possibility is to make sure only the search results pages you want to get indexed get indexed. Manually do it so to speak so you can check them out and allow them in your robots.txt. Some people I know tried on fairly large databases to automate searches to produce thousands of pages. Tens of thousands. They soon got put in their place by G. Rehash of the same content.
seymourjames is offline   Reply With Quote
Old 06-29-2008, 11:59 AM   #10
Member
 
Join Date: Apr 2008
Posts: 51
Rep Power: 7
anna245 is on a distinguished road
Question

Maffo-

Where in classes/kernel/categories.php would you put that code?
anna245 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
title tags on calling urls seymourjames v4 Questions & Support 7 06-01-2008 06:48 PM
Getting title tags with URLs (smarty) seymourjames Modules / Plugins / Modifications 0 04-24-2008 08:39 PM
How To Create A Dynamic Ad Title From Ad Fields? bgordon v3.1 Questions & Support 5 04-16-2007 06:33 PM
Title question Fedeo v3.0 Questions & Support 9 01-25-2007 01:38 PM
Problem getting page title flyingpylon v3.1 Questions & Support 5 10-19-2006 01:15 PM


All times are GMT -4. The time now is 02:41 PM.


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