 |
[CONTRIBUTION] Ultimate SEO URLs v2.1
|
 |
06-07-2005, 02:12 AM
|
#1
|
Putting Keyboard to Code...
Chemo is Offline:
Join Date: Feb 2005
Location: /usa/kentucky/richmond/
Posts: 391 
|
[CONTRIBUTION] Ultimate SEO URLs v2.1
First, welcome to the board.
Let's start the support...
Bobby
__________________
For immediate help call (859) 514-5395
(between 8 AM - 4 PM EST)
Tools
Chemo's Search Engine Spider Simulator
Chemo's PHP Code Pastebin
Sites
My osCommerce Blog
osCommerce Freelancers
osCommerce Development Server
eCommerce Directory
BDC Concepts Directory
|
|
|
06-07-2005, 04:36 AM
|
#2
|
Member
panzz is Offline:
Join Date: Feb 2005
Location: Germany
Posts: 26 
|
Hi Bobby,
great to have your support back.
Have installed the new SEO URL and get an fatal error:
Fatal error: Call to a member function on a non-object in /homepages/14/d13488967/htdocs/includes/functions/html_output.php on line 19
Line 19 is: return $seo_urls->href_link($page, $parameters, $connection, $add_session_id);
}
Can you help me?
Greets,
panzz
|
|
|
06-07-2005, 04:42 AM
|
#3
|
Putting Keyboard to Code...
Chemo is Offline:
Join Date: Feb 2005
Location: /usa/kentucky/richmond/
Posts: 391 
|
Fatal error: Call to a member function on a non-object
This means that the function is being called and the class has not been initialized. Make sure the code in application_top.php has been saved. It should look like this:
Code:
// include the language translations require(DIR_WS_LANGUAGES . $language . '.php'); // Ultimate SEO URLs v2.1 include_once(DIR_WS_CLASSES . 'seo.class.php'); $seo_urls = new SEO_URL($languages_id);
Bobby
__________________
For immediate help call (859) 514-5395
(between 8 AM - 4 PM EST)
Tools
Chemo's Search Engine Spider Simulator
Chemo's PHP Code Pastebin
Sites
My osCommerce Blog
osCommerce Freelancers
osCommerce Development Server
eCommerce Directory
BDC Concepts Directory
|
|
|
06-07-2005, 04:47 AM
|
#4
|
Member
panzz is Offline:
Join Date: Feb 2005
Location: Germany
Posts: 26 
|
The Code is surley saved, here my application_top attached.
Greets,
panzz
|
|
|
06-07-2005, 04:55 AM
|
#5
|
Member
misa is Offline:
Join Date: Jun 2005
Location: Alkmaar-Holland
Posts: 8 
|
Ok Bobby,
First of all thanks for supporting us here.
I have installed both the new contributions without any errors now but wanted to ask you if you could have a quick look at my site if it's ok.
www.bruinenfit.nl
Thanks
|
|
|
06-07-2005, 05:10 AM
|
#6
|
Putting Keyboard to Code...
Chemo is Offline:
Join Date: Feb 2005
Location: /usa/kentucky/richmond/
Posts: 391 
|
Quote:
Originally Posted by panzz
The Code is surley saved, here my application_top attached.
Greets,
panzz
|
Your application_top.php looks fine...
Setup FTP access for me and PM me the details. I'll take a look at your code and get you fixed up.
Bobby
__________________
For immediate help call (859) 514-5395
(between 8 AM - 4 PM EST)
Tools
Chemo's Search Engine Spider Simulator
Chemo's PHP Code Pastebin
Sites
My osCommerce Blog
osCommerce Freelancers
osCommerce Development Server
eCommerce Directory
BDC Concepts Directory
|
|
|
06-07-2005, 05:10 AM
|
#7
|
Putting Keyboard to Code...
Chemo is Offline:
Join Date: Feb 2005
Location: /usa/kentucky/richmond/
Posts: 391 
|
Quote:
Originally Posted by misa
Ok Bobby,
First of all thanks for supporting us here.
I have installed both the new contributions without any errors now but wanted to ask you if you could have a quick look at my site if it's ok.
www.bruinenfit.nl
Thanks
|
Your site looks fine...
Bobby
__________________
For immediate help call (859) 514-5395
(between 8 AM - 4 PM EST)
Tools
Chemo's Search Engine Spider Simulator
Chemo's PHP Code Pastebin
Sites
My osCommerce Blog
osCommerce Freelancers
osCommerce Development Server
eCommerce Directory
BDC Concepts Directory
|
|
|
06-07-2005, 05:16 AM
|
#8
|
Member
nameht is Offline:
Join Date: Mar 2005
Posts: 8 
|
installation went fine for 2.1 but get the following error msg when in admin side for seo urls
Code:
Warning: call_user_func(tep_reset_cache_data_seo_urls): First argument is expected to be a valid callback in /homepages/9/****/htdocs/****/catalog/admin/includes/functions/general.php on line 1305
|
|
|
06-07-2005, 05:24 AM
|
#9
|
Putting Keyboard to Code...
Chemo is Offline:
Join Date: Feb 2005
Location: /usa/kentucky/richmond/
Posts: 391 
|
Quote:
Originally Posted by nameht
installation went fine for 2.1 but get the following error msg when in admin side for seo urls
Code:
Warning: call_user_func(tep_reset_cache_data_seo_urls): First argument is expected to be a valid callback in /homepages/9/****/htdocs/****/catalog/admin/includes/functions/general.php on line 1305
|
Did you complete step #5 of the installation?
Ultimate SEO URLs online documentation
Bobby
__________________
For immediate help call (859) 514-5395
(between 8 AM - 4 PM EST)
Tools
Chemo's Search Engine Spider Simulator
Chemo's PHP Code Pastebin
Sites
My osCommerce Blog
osCommerce Freelancers
osCommerce Development Server
eCommerce Directory
BDC Concepts Directory
|
|
|
06-07-2005, 05:28 AM
|
#10
|
Member
nameht is Offline:
Join Date: Mar 2005
Posts: 8 
|
oh im so dumb  thought i was usign v 2.0 already so skipped that step...but turns out i was usin v1.4
thanks
|
|
|
06-07-2005, 05:34 AM
|
#11
|
Putting Keyboard to Code...
Chemo is Offline:
Join Date: Feb 2005
Location: /usa/kentucky/richmond/
Posts: 391 
|
no problem...at least now you're ready to start upgrading to the next stable releases
The good thing is that the upgrade from here on out is as simple as overwriting the class file.
How many contributions can say that? To upgrade the whole code base just overwrite the file...
Bobby
__________________
For immediate help call (859) 514-5395
(between 8 AM - 4 PM EST)
Tools
Chemo's Search Engine Spider Simulator
Chemo's PHP Code Pastebin
Sites
My osCommerce Blog
osCommerce Freelancers
osCommerce Development Server
eCommerce Directory
BDC Concepts Directory
|
|
|
06-07-2005, 05:39 AM
|
#12
|
Member
nameht is Offline:
Join Date: Mar 2005
Posts: 8 
|
indeed is true  i wish all contributions could be as well documented, organized, and easy to install as yours (not to mention so usefull)
btw you on IM atm? would like to speak to you briefly it all possible
|
|
|
 |
error
|
 |
06-07-2005, 05:56 AM
|
#13
|
Member
hansmignon is Offline:
Join Date: Jun 2005
Posts: 16 
|
error
Hello Bobby,
I have the same problem as panzz.
Call to a member function on a non-object in /var/www/html/includes/functions/html_output.php on line 8
return $seo_urls->href_link($page, $parameters, $connection, $add_session_id);
}
Did you find a solution for this ?
Thanks
Hans
|
|
|
 |
|
 |
06-07-2005, 06:14 AM
|
#14
|
Putting Keyboard to Code...
Chemo is Offline:
Join Date: Feb 2005
Location: /usa/kentucky/richmond/
Posts: 391 
|
I did...but the solution is very server intensive. Panzz is using STS template system and for some reason it's not allowing the global declaration of the $seo_urls object...which is critical for operation.
Use this code for your html_output.php / tep_href_link() function:
Code:
//// // Ultimate SEO URLs v2.1 // The HTML href link wrapper function function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { global $seo_urls; if ( !is_object('seo_urls') ){ global $languages_id; include_once(DIR_WS_CLASSES . 'seo.class.php'); $seo_urls = new SEO_URL($languages_id); } return $seo_urls->href_link($page, $parameters, $connection, $add_session_id); }
Be sure to check back often since I'll be looking for the better solution for this problem...
Bobby
__________________
For immediate help call (859) 514-5395
(between 8 AM - 4 PM EST)
Tools
Chemo's Search Engine Spider Simulator
Chemo's PHP Code Pastebin
Sites
My osCommerce Blog
osCommerce Freelancers
osCommerce Development Server
eCommerce Directory
BDC Concepts Directory
|
|
|
06-07-2005, 06:21 AM
|
#15
|
Member
hansmignon is Offline:
Join Date: Jun 2005
Posts: 16 
|
Thanks Bobby,
It is working but now he is generating another error:
Warning: eregi(): Invalid preceding regular expression in /var/www/html/includes/classes/seo.class.php on line 699
Warning: eregi(): Invalid preceding regular expression in /var/www/html/includes/classes/seo.class.php on line 699
Warning: eregi(): Invalid preceding regular expression in /var/www/html/includes/classes/seo.class.php on line 699
Warning: eregi(): Invalid preceding regular expression in /var/www/html/includes/classes/seo.class.php on line 699
Sorry to disturb you again.
Hans
|
|
|
06-07-2005, 06:33 AM
|
#16
|
Member
panzz is Offline:
Join Date: Feb 2005
Location: Germany
Posts: 26 
|
Bobby,
have done #6 and configure admin.
I think site loads slower than before.
Also the redirect function don't work now:
http://www.trendfabrik.com/product_...?products_id=93
Thanks,
panzz
|
|
|
06-07-2005, 06:34 AM
|
#17
|
Putting Keyboard to Code...
Chemo is Offline:
Join Date: Feb 2005
Location: /usa/kentucky/richmond/
Posts: 391 
|
What is the code above and below line 699? Your file is a bit different than mine now since I've been adding code...
Bobby
__________________
For immediate help call (859) 514-5395
(between 8 AM - 4 PM EST)
Tools
Chemo's Search Engine Spider Simulator
Chemo's PHP Code Pastebin
Sites
My osCommerce Blog
osCommerce Freelancers
osCommerce Development Server
eCommerce Directory
BDC Concepts Directory
|
|
|
06-07-2005, 06:36 AM
|
#18
|
Putting Keyboard to Code...
Chemo is Offline:
Join Date: Feb 2005
Location: /usa/kentucky/richmond/
Posts: 391 
|
The site does indeed run slower...that is because the seo_urls object is being initialized on each call to tep_href_link().
The problem is that for some reason it is not allowing the global declaration of the seo_urls object from application_top.php. The reason why is not know to me at this time. Rest assured that once I find an answer it will be applied to you site first.
As for the redirect: you are running PHP in CGI mode which throws off the URLs a bit. I'll look into it tomorrow...
Bobby
__________________
For immediate help call (859) 514-5395
(between 8 AM - 4 PM EST)
Tools
Chemo's Search Engine Spider Simulator
Chemo's PHP Code Pastebin
Sites
My osCommerce Blog
osCommerce Freelancers
osCommerce Development Server
eCommerce Directory
BDC Concepts Directory
|
|
|
06-07-2005, 06:38 AM
|
#19
|
Member
hansmignon is Offline:
Join Date: Jun 2005
Posts: 16 
|
This is the code from lin 647 till 759
Thanks,
Hans
* Function to check if the products_id contains an attribute
* @author Bobby Easland
* @version 1.0
* @param integer $pID
* @return boolean
*/
function is_attribute_string($pID){
699 if ( eregi('{', $pID) ){
return true;
} else {
return false;
}
} # end function
|
|
|
06-07-2005, 06:45 AM
|
#20
|
Member
panzz is Offline:
Join Date: Feb 2005
Location: Germany
Posts: 26 
|
Quote:
Rest assured that once I find an answer it will be applied to you site first. |
Quote:
As for the redirect: you are running PHP in CGI mode which throws off the URLs a bit. I'll look into it tomorrow... |
Sounds perfect, looking fwd for your great support.
Thanks!
Best,
panzz
|
|
|
06-07-2005, 06:51 AM
|
#21
|
Putting Keyboard to Code...
Chemo is Offline:
Join Date: Feb 2005
Location: /usa/kentucky/richmond/
Posts: 391 
|
Quote:
Originally Posted by hansmignon
This is the code from lin 647 till 759
Thanks,
Hans
* Function to check if the products_id contains an attribute
* @author Bobby Easland
* @version 1.0
* @param integer $pID
* @return boolean
*/
function is_attribute_string($pID){
699 if ( eregi('{', $pID) ){
return true;
} else {
return false;
}
} # end function
|
Try this code for that function and tell me if it works for you:
Code:
function is_attribute_string($pID){ if (is_numeric(strpos($pID, '{'))){ return true; } else { return false; } } # end function
EDIT: forgot a closing bracket
Bobby
__________________
For immediate help call (859) 514-5395
(between 8 AM - 4 PM EST)
Tools
Chemo's Search Engine Spider Simulator
Chemo's PHP Code Pastebin
Sites
My osCommerce Blog
osCommerce Freelancers
osCommerce Development Server
eCommerce Directory
BDC Concepts Directory
|
|
|
06-07-2005, 07:34 AM
|
#22
|
Member
hansmignon is Offline:
Join Date: Jun 2005
Posts: 16 
|
Hello Bobby,
It is working but now he has a problem with line 1329.
function need_redirect(){
1329 if ( ereg("{|}", $this->real_uri) ){ $this->need_redirect = false;
} else {
foreach( $this->reg_anchors as $param => $value){
$pattern[] = $param;
}
About the oscommerce problem with Herald. Will you start your own oscommere project ?
Thanks,
Hans
|
|
|
06-07-2005, 07:37 AM
|
#23
|
Putting Keyboard to Code...
Chemo is Offline:
Join Date: Feb 2005
Location: /usa/kentucky/richmond/
Posts: 391 
|
Try this function:
Code:
function need_redirect(){ if ( is_numeric(strpos($this->real_uri, '{')) ){ $this->need_redirect = false; } else { foreach( $this->reg_anchors as $param => $value){ $pattern[] = $param; } $this->uri != $this->real_uri ? $this->need_redirect = false : eregi("(cName|pName|mName)", $this->uri) ? $this->attributes['SEO_REWRITE_TYPE'] != 'cName' ? $this->need_redirect = true : $this->need_redirect = false : eregi("(".implode('|', $pattern).")", $this->uri) ? $this->need_redirect = true : $this->need_redirect = false; } } # end function set_seopage
Bobby
__________________
For immediate help call (859) 514-5395
(between 8 AM - 4 PM EST)
Tools
Chemo's Search Engine Spider Simulator
Chemo's PHP Code Pastebin
Sites
My osCommerce Blog
osCommerce Freelancers
osCommerce Development Server
eCommerce Directory
BDC Concepts Directory
|
|
|
06-07-2005, 08:06 AM
|
#24
|
Member
hansmignon is Offline:
Join Date: Jun 2005
Posts: 16 
|
Yes it is working.
Thank you verry much Bobby.
Will you still work with oscommerce ?
Thx,
Hans
|
|
|
06-07-2005, 08:30 AM
|
#25
|
Putting Keyboard to Code...
Chemo is Offline:
Join Date: Feb 2005
Location: /usa/kentucky/richmond/
Posts: 391 
|
Quote:
Originally Posted by hansmignon
Yes it is working.
Thank you verry much Bobby.
Will you still work with oscommerce ?
Thx,
Hans
|
That is up to Harald and the project team...
Bobby
__________________
For immediate help call (859) 514-5395
(between 8 AM - 4 PM EST)
Tools
Chemo's Search Engine Spider Simulator
Chemo's PHP Code Pastebin
Sites
My osCommerce Blog
osCommerce Freelancers
osCommerce Development Server
eCommerce Directory
BDC Concepts Directory
|
|
|
Thread Tools
|
|
Display Modes
|
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 10:40 AM.
|
|
|
|
|