How to I create a sef_ext.php

17 years 10 months ago #103 by divivo
I would like to create a sef_ext.php file for my component.  Where can I find some instruction.  Is it possible to have a demo version to try?
Thank you in advance

Please Log in or Create an account to join the conversation.

17 years 10 months ago #104 by Saka
Hello,

The documentation explains the basic principle of writing a SEF Advance extension. In the SEF Advance package you can find example sef_ext.php file which can be used as a template for writing your own. You can also look at the extensions for already available components like userlist, recommend or bookmarks.

There is also a nice written tutorial here .

The trial version of SEF Advance to test with can be downloaded here:
www.sakic.net/products/sef_advance/trial/

Good luck.

Emir Sakic
www.sakic.net

Please Log in or Create an account to join the conversation.

17 years 8 months ago #480 by GwaiTsi
Can you give some help to get started please.

I use the sample sef_ext.php included.
- I change the class name to joomap (for Joomla sitemap component).

All works good at this point using the sample. The SEF is the component name so the URL looks like www.mysite.com/joomap

Now for example i want to change the SEF name, so i use

$custom_comp = array(
"joomap" => "sitemap"
);

Now the URL shows www.mysite.com/sitemap but the link takes me to the home page.

So, i obviously have something very basic wrong.

Please Log in or Create an account to join the conversation.

17 years 8 months ago #481 by Saka
Post your extension file.

Emir Sakic
www.sakic.net

Please Log in or Create an account to join the conversation.

17 years 8 months ago #482 by GwaiTsi
i figured it, thanks.....

Please Log in or Create an account to join the conversation.

17 years 8 months ago #483 by GwaiTsi
So i have another problem....
I am trying to make an extension for the gallery2 bridge.

The string passed to the create() only has the the component id.
i am therefore not able to process the remainder as it doesn't exist.

The component is successfully being proceed as "photos" from the URL
www.canza.cz/option,com_gallery2/Itemid,55/

Mouse over the photo produces the following URL
www.canza.cz/photos/?g2_itemId=17/
but it is not passed as the string when the mouse is clicked.
only the component part, thus making it impossible to fully process.

defined( '_VALID_MOS' ) or die( 'Restricted access' );

$custom_comp = array(
"gallery2" => "photos"
);

class sef_gallery2 {

function create ($string) {
return $sefstring;
}

        function revert ($url_array, $pos) {
$QUERY_STRING = '';
return $QUERY_STRING;

}

Please Log in or Create an account to join the conversation.

About us

We provide high quality Joomla components created by a co-founder and original core developer of Joomla. For over a decade, our products have been used by more than 20.000 webmasters around the world.

Stay in touch