Plugin sh404SEF

Phoca Guestbook - creating guestbooks in Joomla! CMS
jagwar77
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 09 Jan 2009, 14:35

Plugin sh404SEF

Post by jagwar77 »

Hi Phoca users,

here's attached the sh404SEF plugin file and it will be my modest contribution to the Phoca Community...

@Jan :
I have been testing the plugin in my production site the whole day today and it seems to work fine, except the captcha image won't show up as sh404SEF is enabled. I found out where was the problem from but i couldn't resolve it as yet:

the image URL contained in components/com_phocaguestbook/views/phocaguestbook/tmpl/default.php is removed by sh404SEF :

Code: Select all

<img src="<?php echo JRoute::_('index.php?option=com_phocaguestbook&view=phocaguestbooki&id='.$this->id.'&Itemid='.$this->itemid.'&phocasid='. md5(uniqid(time()))) ; ?>" alt="<?php JText::_('Captcha Image'); ?>" id="phocacaptcha" />
If you have any idea...

Best Regards,
Jagwar77 :wink:
sh404sef_phocaguestbook_plugin.zip
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Plugin sh404SEF

Post by Jan »

Hi, thank you for this plugin...

- wrong url ... I have no idea how to do that the sh404 will not change the link to image ? :( I think only what user can do is manually changing the link, e.g. remove the JRoute or JHTML method ... but in such case maybe the path will be not correct... maybe the link to image should be added into plugin and there some exception should be created :idea:

Jan
If you find Phoca extensions useful, please support the project
jagwar77
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 09 Jan 2009, 14:35

Re: Plugin sh404SEF

Post by jagwar77 »

Hi Jan,

I'll try to fix this issue next week. It should be not that difficult to resolve it...

Regards,

Pascal
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Plugin sh404SEF

Post by Jan »

ok
If you find Phoca extensions useful, please support the project
User avatar
Ray
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 06 May 2009, 16:48
Location: Russia, Cherepovets

Re: Plugin sh404SEF

Post by Ray »

Hi, guys!

When i've selected "Captcha Displaying Method" = "JRoute" in config settings, parts of preview html code:
'&Itemid='
instead of:
'&Itemid='.
Therefore as &amp is in "JHTML" part. Is this error?

& some fix about sh404SEF plugin:
when I've changed In file "/components/com_phocaguestbook/views/phocaguestbook/tmpl/default.php"

Code: Select all

echo JHTML::_( 'image.site','index.php?option=com_phocaguestbook&view=phocaguestbooki&id='.$this->id.'&Itemid='.$this->itemid.'&phocasid='. md5(uniqid(time())), '', '','',JText::_('Captcha Image'), array('id' => 'phocacaptcha'));
to

Code: Select all

echo JHTML::_( 'image.site','index.php?option=com_phocaguestbook&view=phocaguestbooki&id='.$this->id.'&Itemid='.$this->itemid.'&phocasid='. md5(uniqid(time())));
captcha works fine. Section "JRoute" and has not working.
Best regards, Ray
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Plugin sh404SEF

Post by Jan »

Hi, there are two methods of displaying images in Joomla! On some servers the JHTML doesn't work on some the JRoute doesn't work.

& is not error
If you find Phoca extensions useful, please support the project
User avatar
Ray
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 06 May 2009, 16:48
Location: Russia, Cherepovets

Re: Plugin sh404SEF

Post by Ray »

Jan, You've made a cool components & modules for joomla! Thank you!
May be a little bug, I probably a little not so was expressed:
Captcha Displaying Method" = "JRoute" --> echo JHTML::_ etc.. (line 273 of default.php)
Captcha Displaying Method" = "JHTML" --> echo JRoute::_ etc.. (line 271 of default.php)

Editing line "echo JHTML" influences on "JRoute". HTML Code viewing confirms it. Guestbook v1.3.2

Most likely an error here: (line 268 of default.php, if JRoute = 0, JHTML = 1)
if ($this->tmpl['captchamethod'] == 1) {
fix:
if ($this->tmpl['captchamethod'] == 0) {

Sorry for my english..
Best regards, Ray
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Plugin sh404SEF

Post by Jan »

Ok

Ray
Yes this is a bug. :-) Thank you for this information, I will fix it.

Thank you, Jan
If you find Phoca extensions useful, please support the project
User avatar
Ray
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 06 May 2009, 16:48
Location: Russia, Cherepovets

Re: Plugin sh404SEF

Post by Ray »

Jan, I'm glad to help you :wink:
Best regards, Ray
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Plugin sh404SEF

Post by Jan »

Hi, maybe you should as the sh404SEF developers. As I didn't do this plugin and don't use it I don't know it :(
If you find Phoca extensions useful, please support the project
Post Reply