Favourites problem also when using redirects
2 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: June 9, 2010 (RSS)
By (Deleted User) - June 8, 2010
Hello,
Similar to my other post (http://www.interactivetools.com/iforum/Products_C2/CMS_Builder%3A_Plugins_%26_Add-ons_F40/Membership_errors_when_using_redirects_P81085/)
about the membership plugin, i am also having problems with the Favourites plugin. I realise they are both related in the fact that they are trying to reference pages that aren't actually there - only via the htaccess rewrite.
So what is the problem with favourites? Well when I add the favorites code:
I run into problems as the blog-entry.php is rewritten to /blogs/keywords-num
(keywords are written in the cms and the num is the post number)
This part was coded like: /blogs/<?php echo $record['url_key'] ?>-<?php echo $record['num'] ?>
Now I expect you are thinking just turn off the redirects but the SEO benefits they give is far greater than the problems.
Does anyone have any suggestions?
Thanks Jono
Similar to my other post (http://www.interactivetools.com/iforum/Products_C2/CMS_Builder%3A_Plugins_%26_Add-ons_F40/Membership_errors_when_using_redirects_P81085/)
about the membership plugin, i am also having problems with the Favourites plugin. I realise they are both related in the fact that they are trying to reference pages that aren't actually there - only via the htaccess rewrite.
So what is the problem with favourites? Well when I add the favorites code:
<div class="right">
<?php $tableOrTag = 'blog';$recordNum = $blogRecord['num'];?>
<div class="<?php wsf_cssClassFor($tableOrTag, $recordNum, 'add'); ?>"
style="<?php wsf_displayStyleFor($tableOrTag, $recordNum, 'add'); ?>">
<a href="#" onclick="<?php wsf_onClickFor($tableOrTag, $recordNum, 'add'); ?>">Add as a Favorite</a>
</div>
<div class="<?php wsf_cssClassFor($tableOrTag, $recordNum, 'remove'); ?>"
style="<?php wsf_displayStyleFor($tableOrTag, $recordNum, 'remove'); ?>">
<a href="#" onclick="<?php wsf_onClickFor($tableOrTag, $recordNum, 'remove'); ?>">Remove Favorite</a>
</div>
</div>
I run into problems as the blog-entry.php is rewritten to /blogs/keywords-num
(keywords are written in the cms and the num is the post number)
This part was coded like: /blogs/<?php echo $record['url_key'] ?>-<?php echo $record['num'] ?>
Now I expect you are thinking just turn off the redirects but the SEO benefits they give is far greater than the problems.
Does anyone have any suggestions?
Thanks Jono
Re: [jonoc73] Favourites problem also when using redirects
By Jason - June 9, 2010
Hi Jono,
I figured out our problem. The jQuery that controls the favorites actually had to be tweaked slightly to allow for the url rewrite. So it now works with the "/blogs/blog-one-1" style format.
You will have to make sure that when you're showing lists of these favorites on the profile page, that they are linking to that format. The links will still work, but with the old url format, the "Add/Remove" buttons won't do anything.
Hope this helps.
I figured out our problem. The jQuery that controls the favorites actually had to be tweaked slightly to allow for the url rewrite. So it now works with the "/blogs/blog-one-1" style format.
You will have to make sure that when you're showing lists of these favorites on the profile page, that they are linking to that format. The links will still work, but with the old url format, the "Add/Remove" buttons won't do anything.
Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/