|
All times are UTC |
|
|
Page 1 of 2 |
[ 14 posts ] | Go to page 1, 2 Next |
| Print view | Previous topic | Next topic |
| Author | Message |
|---|---|
|
Site Admin Joined: Wed Dec 12, 2007 9:34 pm Posts: 295 |
SEO Friendly Page Titles Hack
Next up we have Pliggs page titles, this is a really simple little hack that anyone can do I around 2 minutes and it should work on any version of pligg although i have only tested it with v9.8.2. What this hack does is more commonly know or referred to as reversing page titles or optimal page titles. Here are some examples of this below. Original Pligg Story Title Design Float - Joshua Glenn: Taking Things Seriously SEO’d Pligg Story Title Joshua Glenn: Taking Things Seriously / Design Float Original Pligg Search and Tag Title Design Float / Search Results For: design SEO’d Pligg Search and Tag Title Design Search Results / Design Float Original Pligg Search and Tag Title Design Float / Tage Cloud SEO’d Pligg Static Page Title Tag Cloud / Design Float As you can see the most important keywords are now located farthest to the left in the page title. Below are the instructions to achieve this…. Open template/yourtemplate/pligg.tpl and FIND Quote: <title>{if isset($pretitle)}{$pretitle}{/if}{#PLIGG_Visual_Name#}{if isset($posttitle)}{$posttitle}{/if}</title> REPLACE WITH {if $pagename eq "story" || $pagename eq "topusers" || $pagename eq "cloud"} <title>{$posttitle|substr:3} / {#PLIGG_Visual_Name#}</title> {elseif $pagename eq "search"} <title>{$posttitle|substr:22} search results / {#PLIGG_Visual_Name#}</title> {else} <title>{$pretitle}{#PLIGG_Visual_Name#}{$posttitle }</title> {/if} Completed and your pligg site now has wonderful SEO Optimized Page Titles. |
| Tue Dec 25, 2007 1:32 am |
|
|
Joined: Sun Dec 30, 2007 6:15 pm Posts: 1 |
First of all many thanks for these great edits.
I used the first two, friendly url and duplicate content and they both worked fine. This one though gave me mysql error and I could not open any page on the site without getting it. Any ideas? |
| Sun Dec 30, 2007 6:18 pm |
|
|
Site Admin Joined: Wed Dec 12, 2007 9:34 pm Posts: 295 |
Hi plighackrich,
I have tested this in v9.8.2 of pligg and working fine m8, no idea why you get a MYSQL error as these code edits do not affect the database and use smarty templating engine to acheive the page title reversal. Try making the edits again dude as the code above is running live on a few sites now with no problems Design Float is one of them, sorry i can't be of more help. Make sure that the " within the code is correct as phpbb messes them up when posted within a CODE bbcode in the forums that's what will be causing your errors |
| Sun Dec 30, 2007 10:33 pm |
|
|
Joined: Mon Jan 14, 2008 6:21 pm Posts: 3 |
hmmm... it get the following error when using this hack:
Code: Fatal error: TPL: [in yget/pligg.tpl line 72]: syntax error: unidentified token '�story�' (compile.compile_if.php, line 130) in /home/cotton/public_html/historynexus.net/class.template.php on line 923 Not sure why... it must conflict with another modification I have made to the code... |
| Mon Jan 14, 2008 6:23 pm |
|
|
Site Admin Joined: Wed Dec 12, 2007 9:34 pm Posts: 295 |
Divisive Cotton wrote: hmmm... it get the following error when using this hack: Code: Fatal error: TPL: [in yget/pligg.tpl line 72]: syntax error: unidentified token '�story�' (compile.compile_if.php, line 130) in /home/cotton/public_html/historynexus.net/class.template.php on line 923 Not sure why... it must conflict with another modification I have made to the code... Hi Divisive, The problem lies with the phpbb3 forum and it's CODE bbcode The phpbb bbcode for CODE made the " within the optimal titles code mess up, should be fine now if you copy to your template Cheers for the tipoff m8 it was something i didn't pick up on the first time, my bad Lincoln |
| Tue Jan 15, 2008 2:49 pm |
|
|
Joined: Mon Jan 14, 2008 6:21 pm Posts: 3 |
ahh... got it...
despite cutting and pasting the code to notepad that "" were wrong... deleted those and inserted the proper ones... cheers |
| Wed Jan 16, 2008 8:49 pm |
|
|
Site Admin Joined: Wed Dec 12, 2007 9:34 pm Posts: 295 |
Divisive Cotton wrote: ahh... got it... despite cutting and pasting the code to notepad that "" were wrong... deleted those and inserted the proper ones... cheers Cool Divisive, Yeah your right the quoting dont work either, DAMN phpbb3 hehe need to find a solution for that asap. Good to hear you got it working though |
| Wed Jan 16, 2008 11:11 pm |
|
|
Joined: Fri Feb 08, 2008 4:39 am Posts: 4 |
Thank you for yet another wonderful template. I swear when I get some extra cash I am going to make a donation. If anyone deserves it it is you.
Thanks again. |
| Sun Feb 10, 2008 10:31 pm |
|
|
Joined: Wed Feb 06, 2008 6:38 am Posts: 7 |
I get an error when I do that.
Code: Fatal error: TPL: [in vera/pligg.tpl line 44]: syntax error: unidentified token '“story”' (compile.compile_if.php, line 130) in /home/domain/public_html/class.template.php on line 923 ohh sorry didnt read the last comments, yes i got it, instead of copying and pasting directly into the Templates editor, use Notepad, and replace the “ ” with " " Last edited by Koshin on Thu Feb 14, 2008 2:31 am, edited 1 time in total. |
| Thu Feb 14, 2008 2:23 am |
|
|
Site Admin Joined: Wed Dec 12, 2007 9:34 pm Posts: 295 |
Koshin wrote: I get an error when I do that. Code: Fatal error: TPL: [in vera/pligg.tpl line 44]: syntax error: unidentified token '“story”' (compile.compile_if.php, line 130) in /home/domain/public_html/class.template.php on line 923 Read 5 posts up from here m8 as i had already explained this error I have removed the code from php code system, try copying it again now pligg-seo-friendly-optimal-page-titles-hack-t9.html#p63 |
| Thu Feb 14, 2008 2:24 am |
|
|
|
Page 1 of 2 |
[ 14 posts ] | Go to page 1, 2 Next |
|
All times are UTC |
Who is online |
Users browsing this forum: No registered users and 0 guests |
| 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 post attachments in this forum |

