Make Extension some Problem
- Aquilasfx
-
Topic Author
- Offline
- New Member
-
Less
More
- Thank you received: 0
16 years 11 months ago #2684
by Aquilasfx
I have make a new extension for a component but don't work fine...
The Url rewrite is correct but there are 2 mistake:
1: I have in my component a multi ordering/sort buttons in Top7 function with Ordering by date(year, month, lastEvent) and a ordering by gender(rating, views, comments)
The links works in this ways [if I click on year for example charge the page and then if I click on order by comments the page charged output a chart order by date "YEAR" select first and with order by "COMMENTS"]. The problem is now with this code don't charge the page with the past selection I have make, but only the last
2: If I select button year or any other buttons the link are correct but don't charge the correct page with the result but recharge this page without consider my choice!
the url without sef enable are like this: www.mysite.it/index.php?option=com_galle...ear&orderby=comments
Sef url I make based on the code up are like this:
www.mysite.it/gallery/Top.7/Anno/
This doesn't work I don't know why sef don't generate this url..
www.mysite.it/gallery/Top.7/Anno/Commenti/
function create (&$string) {
...
...
...
// Top7, except search
// func=top7, sorting=$var1
if (stristr($string,"&func=top7")) {
if (stristr($string,"&date=")) {
$temp = explode("&date=", $string);
$temp = explode("&", $temp[1]);
$date_sort = $temp[0];
switch ($date_sort) {
case "year" :
$date_sort = "Anno/";
break;
case "week" :
$date_sort = "Last.Event/";
break;
case "month" :
$date_sort = "Mese/";
break;
}
}
if (stristr($string,"&orderby=")) {
$temp = explode("&orderby=", $string);
$temp = explode("&", $temp[1]);
$orderby = $temp[0];
switch ($orderby) {
case "comments" :
$orderby = "Commenti/";
break;
case "views" :
$orderby = "Visite/";
break;
case "rating" :
$orderby = "Voti/";
break;
}
}
$tempstring = "Top.7";
$sefstring .= $tempstring.'/'.$date_sort.$orderby;
return $sefstring;
}
}
function revert (&$url_array, &$pos) {
....
....
...
// description: Top7
// variables: func=special, sorting=$var1
if (isset($url_array[$pos+2]) && $url_array[$pos+2] != '' && ($url_array[$pos+2] == "Top.7" )) {
$func = "top7";
$_REQUEST['func'] = $func;
$QUERY_STRING .= "&func=$func";
switch ($url_array[$pos+3]) {
case "Anno":
$date = "year";
break;
case "Last.Event":
$date = "week";
break;
case "Mese":
$date = "month";
break;
}
if( $date != null ){
$_REQUEST['date'] = $date;
$QUERY_STRING .= "&date=$date";
}
switch ($url_array[$pos+3]) {
case "Commenti":
$orderby = "comments";
break;
case "Visite":
$orderby = "views";
break;
case "Voti":
$orderby = "rating";
break;
}
switch ($url_array[$pos+4]) {
case "Commenti":
$orderby = "comments";
break;
case "Visite":
$orderby = "views";
break;
case "Voti":
$orderby = "rating";
break;
}
if( $orderby != null ){
$_REQUEST['orderby'] = $orderby;
$QUERY_STRING .= "&orderby=$orderby";
}
echo $QUERY_STRING;
return $QUERY_STRING;
}
...
..
The Url rewrite is correct but there are 2 mistake:
1: I have in my component a multi ordering/sort buttons in Top7 function with Ordering by date(year, month, lastEvent) and a ordering by gender(rating, views, comments)
The links works in this ways [if I click on year for example charge the page and then if I click on order by comments the page charged output a chart order by date "YEAR" select first and with order by "COMMENTS"]. The problem is now with this code don't charge the page with the past selection I have make, but only the last

2: If I select button year or any other buttons the link are correct but don't charge the correct page with the result but recharge this page without consider my choice!
the url without sef enable are like this: www.mysite.it/index.php?option=com_galle...ear&orderby=comments
Sef url I make based on the code up are like this:
www.mysite.it/gallery/Top.7/Anno/
This doesn't work I don't know why sef don't generate this url..
www.mysite.it/gallery/Top.7/Anno/Commenti/
Please Log in or Create an account to join the conversation.
- Aquilasfx
-
Topic Author
- Offline
- New Member
-
Less
More
- Thank you received: 0
16 years 11 months ago #2703
by Aquilasfx
sakic please considere my request for help
Please Log in or Create an account to join the conversation.
- Saka
-
- Offline
- Administrator
-
16 years 11 months ago #2718
by Saka
Emir Sakic
www.sakic.net
I can't answer this because I would need to test your component and also test your extension.
To create a custom extensions costs extra fee, you can contact me on mail if you are interested.
To create a custom extensions costs extra fee, you can contact me on mail if you are interested.
Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.
- Aquilasfx
-
Topic Author
- Offline
- New Member
-
Less
More
- Thank you received: 0
16 years 11 months ago #2724
by Aquilasfx
I want to create myself extension.... I only request why there are these mystake.. but nothing.. you request more fee for this.. ... ... My question not is HOW make the extension but WHY it's wrong .. I considered the tutorial to make new extension... I think would You have to appreciate that people make own extension by themselves..
Please Log in or Create an account to join the conversation.
- Saka
-
- Offline
- Administrator
-
16 years 10 months ago #2730
by Saka
Emir Sakic
www.sakic.net
I can't answer what is wrong with your extension without debugging it with your component, and that's custom job.
Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.