Plugin for sh404SEF

jitteryjack 23 Nov, 2007
Hi,
Lately my site has been getting a lot of attacks to the Chonoform contact. I think due mainly to the fact this is one of two links which sh404SEF cannot process successfully due to the lack of a plugin for the component, so it shows the component name in the url.

Is there a plugin available for sh404SEF? There is a how-to on writing a plugin, but unfortunately I am no PHP programmer. If anyone volunteers,
here is the url.

Post edited by: GreyHead, at: 2007/11/28 20:54<br><br>Post edited by: GreyHead, at: 2007/11/28 20:54
GreyHead 24 Nov, 2007
Hi Jitteryjack,

I have sh404SEF installed on my site and will have a look at what would be involved in a plugin - no promises though.

Bob
GreyHead 29 Nov, 2007
Hi JitteryJack,

I've put together a very simple plugin - all it does is create a url of the form "http://mysite.com/my_form_name/" in place of the usual
http://mysite.com/index.php?option=com_chronocontact&chronoformname=my_form_name


To install, unzip the attached folder and file and ftp into your components/com_chronocontact folder. The file path should be
components/com_chronocontact/sef_ext/com_chronocontact.php

Bob

[file name=sef_ext.zip size=641]http://www.chronoengine.com/components/com_fireboard/uploaded/files/sef_ext.zip[/file]<br><br>Post edited by: GreyHead, at: 2007/11/28 21:00
jitteryjack 29 Nov, 2007
Thanks Bob,
I will try it and let you know.
stu 04 Dec, 2007
This would be great, but when I tried it, my links to the forms went to the home page. The link was ../joomla2/index.php?/.
jitteryjack 04 Dec, 2007
It worked for me with no problems. Maybe you have a custom url for chronoforms or changed the default behavior for the component.
GreyHead 04 Dec, 2007
Hi stu,

That's bizarre, looks as though sh404SEF isn't picking it up at all as I think otherwise the index.php would be suppressed. What shows up in the URL database?

Bob
Muneo 09 Jun, 2008
I didn't understand how it work...
I have installed Chronoforms and Sh404SEF. After follow this instruction (unzip and upload in chronoform's folder), how enable the plugin?

:blush:
GreyHead 09 Jun, 2008
Hi Muneo,

If I remember correctly, that's all you need. Sh404SEF will check the folder and find it automatically.

Bob
Muneo 10 Jun, 2008
Simply perfect!🙂
jimwin 12 Sep, 2008
Hi there,

I've been thinking of using SH404SEF on my site which already has chronoforms and chronoconnectivity running.

I was wondering if the SEF_EXT on downloads works with J! 1.5 or J! 1.0, and also whether it will work with SH404SEF?

The website has been running pretty well with the built-in Joomla SEF, where SEF URLS are built using the menu location, but it would be nice to be able to use the custom URL redirection and 404 from SH404SEF.

I've run a test, and while SH404SEF doesn't appear to stop the forms from running, the URL was better with the built-in SEF. Am I likely to get any problems using SH404SEF and Chrono?
Max_admin 12 Sep, 2008
Hi Jim, I'm really not sure as I never tried this sh404SEF after using Joomla 1.5, simply J1.5 built in SEF is the best, why should I overload the site with extra SEF queries ?

Regards

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jimwin 12 Sep, 2008
yes, I know what you mean about the built in SEF, it really is very good!

The main advantage I can see on the SH40SEF version, is that you can create a customer 404 error page from an article, and forward people onto the correct page if you change things on the site. The live site I managed was previously a static HTML site built in frontpage 😶 , and I wanted to allow my very un-technical members to find items using their existing bookmarks.

Without SH404SEF, all they get is an ugly 404 error page, which I've noticed is the same on the chronoengine site. If there's an easier way of doing this, then I'd probably use it!
Max_admin 12 Sep, 2008
Hi jim,

no problems, backup this file : templates/system/error.php then edit it, I believe this is the 404 page or the error page users will get, so make it whatever you want.

for best practice, create error.php file inside your template folder, for example js_purity and see if this is the one which will get loaded ? they call it overriding, just let me know, regarding redirects I can tell you how to set them in the error.php if it worked😉

Regards

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
lw_d 14 Sep, 2008
The file from greyhead seems to be a 404, anyone reason why its no longer available?

Thanks
GreyHead 14 Sep, 2008
Hi lw_d,

The link was broken when Max switched from FireBoard to PHPBB for the forums here. You can download the Joomla 1.0.x version from my site here. There is also a provisional Joomla 1.5.x version which I think should be in another thread here - if you need it and can't find it let me know and I'll hunt it down.

Bob
jimwin 17 Sep, 2008

Hi jim,

no problems, backup this file : templates/system/error.php then edit it, I believe this is the 404 page or the error page users will get, so make it whatever you want.

for best practice, create error.php file inside your template folder, for example js_purity and see if this is the one which will get loaded ? they call it overriding, just let me know, regarding redirects I can tell you how to set them in the error.php if it worked😉

Regards

Max



Hi Max,

I managed to get most of my site working with sh404sef, including using custom redirects for the chronoforms, but I'm not entirely happy with what its doing in the background, as I'm now getting errors in the Apache logs!

I'm going to see if I can get a better solution using the error.php, but I've not played with php much yet!

What I've come up with so far (using Google), is the following:
<?php
defined( '_JEXEC' ) or die( 'Restricted index access' );
if (($this->error->code) == '404') {
header('Location: ' . $this->baseurl . '/404.html');
exit;
}
else {
header('Location: ' . $this->baseurl . '/error.html');
exit;
}

The /404.html and /error.html are both SEF addresses for Joomla pages. I've created an errors menu with links to these items to create the SEF addresses, and disabled the module so they don't normally appear. I found I needed a general error page as well as the 404, as the server gives a 500 error if the mistyped URL ends in '.htm' instead of '.html'.

The next step would be to create some redirects to forward previously used URLS to the updated ones. Can you show me how to get those going too?

Thanks again,
Jim
Max_admin 17 Sep, 2008
Hi Jim,

I think all you need is to add whatever HTML you like in the error.php and keep this page to show whenever an error is shown, just make it looks better!

this line will redirect to any page whenever its called :

$mainframe->redirect('http://www.google.com');


Regards

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jimwin 17 Sep, 2008
Thanks for the quick response as ever!

I'm not sure how to make that do what I want. I'd like to do the equivalent of a 301 redirect for individual URLs, a bit like the following in the .htaccess file:

Redirect 301 /page1.htm /new-page1.html
Redirect 301 /page2.htm /folder/new-page2.html
Redirect 301 /page3.htm /new-page3.html


Am I completely missing the point here? Like I said, I've not tried any php yet, so I'm probably being dense!

I'm quite pleased with the 404 error handling, but I don't understand how to get php to respond depending on the URL.

Jim
Max_admin 17 Sep, 2008
Hi Jim,

what happens now when your site gives a 404 or 301 or any error ? it loads the error.php I believe, this error.php has some PHP variables, which write the error code like 404 or whatever, so, what I suggested is to make a cool error.php, use the same PHP variables there to tell the user this is which error and offer suggestions.

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger