Go Back   Mosets Community > Mosets Hot Property 0.98 > Hot Property Troubleshooting and Problems

Reply
 
Thread Tools Display Modes
  #1  
Old 10-20-2005, 02:18 AM
vanwel vanwel is offline
Senior Member
 
Join Date: Mar 2005
Posts: 200
Default I need SEF to display property id number!

Hi,

Im using sef for hotproperty, because that looks much better.
But, I have a pretty big problem.

When two properties have the same name, the generated sef link points to one of those properties.

To overcome this issue, I'd like to add the property id to the string again.
I think this has to be done in the sef_ext.php, but how exactly?

Please help me.

Kind regards,
Menno
Reply With Quote
  #2  
Old 10-20-2005, 06:23 AM
Kimon Kimon is offline
Member
 
Join Date: Feb 2005
Location: Greece
Posts: 34
Default

Quote:
Originally Posted by vanwel
Hi,

Im using sef for hotproperty, because that looks much better.
But, I have a pretty big problem.

When two properties have the same name, the generated sef link points to one of those properties.

To overcome this issue, I'd like to add the property id to the string again.
I think this has to be done in the sef_ext.php, but how exactly?

Please help me.

Kind regards,
Menno
I'm facing the same prob.
For the time being I am being creative when i name my properties, but as the site grows, I'm running out of options.
Right now I have a few appartments in "Kolonaki" (it's an area in Athens), and i'm running out of names/titles, it goes like: Appartment in Kolonaki - Penthouse in Kolonaki - renovated apartment in Kolonaki, u get the idea.
I'm also using SEF advanced, and i think that a uniqe id per property in the url could solve this.

Another idea i had was the custom allias setting in latest SEF advance that can give custom urls per object, but i haven't play with this yet, and turning on/off seo to see the real non-sef url each time u publish a property is not practical i think.

Maybe the developers should come with a solution to this.. can't be that hard

Thanks.

Kimon.
Reply With Quote
  #3  
Old 10-20-2005, 02:55 PM
vanwel vanwel is offline
Senior Member
 
Join Date: Mar 2005
Posts: 200
Default

Indeed.

By the way, I'm using Xaneon extensions and not SEF Advance.
I've got a modified search, using the GET method. That way you can search, go to a property and use the back button to return to your search results.
When using SEF Advance, the search function doesn't work anymore.
I get the http://www.mydomain.com/advsearchr/stringwithvariables
with the message that there are no results.
When I turn on the debug mode, I can see the non SEF results and the string it shows there, DOES give me the search results. No idea where it goes wrong.
Damn... paid 40 dollars for it.

Xaneon does it for free and somehow doesn't 'sef' the search function. So... no sefs for the search function (the results showing aren't sef either, that is a pity), but at least it works.

Are you using GET or POST?
Reply With Quote
  #4  
Old 10-20-2005, 02:56 PM
vanwel vanwel is offline
Senior Member
 
Join Date: Mar 2005
Posts: 200
Default

By the way... don't think it's hard either... can't be more than 4 or 5 lines of code?
Reply With Quote
  #5  
Old 10-20-2005, 08:33 PM
vanwel vanwel is offline
Senior Member
 
Join Date: Mar 2005
Posts: 200
Default

Alex? Dknight? Anybody?

I could really really use this. Since agents add their own properties, they aren't aware of the fact that someone else uses the same name.

Actually... I'd like to get rid of the name thing and let it display the suburb and the property id....
Reply With Quote
  #6  
Old 10-21-2005, 09:04 PM
vanwel vanwel is offline
Senior Member
 
Join Date: Mar 2005
Posts: 200
Default

Done some hacking myself.

Here is the code to let it display:
/suburb/id
instead of
/name

Quote:

# View Property
if (eregi("&task=view&id=",$string)) {

$temp = split("&id=", $string);
$temp = split("&", $temp[1]);
$property_id = $temp[0];

if ( is_numeric($property_id) ) {
$database->setQuery( "SELECT t.name AS type_name, p.suburb AS property_suburb, p.id AS property_id FROM #__hp_properties AS p"
. "\nLEFT JOIN #__hp_prop_types AS t ON p.type = t.id"
. "\nWHERE p.id = '".$property_id."'"
. "\nLIMIT 1"
);
$database->loadObject( $row );

$sefstring .= _HP_SEF_PROPERTY."/".sefencode($row->type_name)."/".sefencode($row->property_suburb)."/".sefencode($row->property_id)."/";
}
}

Last edited by vanwel; 10-21-2005 at 09:39 PM.
Reply With Quote
  #7  
Old 10-21-2005, 09:08 PM
vanwel vanwel is offline
Senior Member
 
Join Date: Mar 2005
Posts: 200
Default

Ok. This gives a nice link, but the link doesn't work right....

I'll keep trying..
Reply With Quote
  #8  
Old 10-21-2005, 09:39 PM
vanwel vanwel is offline
Senior Member
 
Join Date: Mar 2005
Posts: 200
Default

Update:

Go to the bottom of the sef document and find the view proeprty again.

Replace that part with the following:

Quote:
# View Property
if (isset($url_array[$pos+4]) && $url_array[$pos+5] && $url_array[$pos+5]!="" && $url_array[$pos+6]=="") {
$type_name = sefdecode($url_array[$pos+3]);
$property_suburb = sefdecode($url_array[$pos+4]);
$property_id = sefdecode($url_array[$pos+5]);

$database->setQuery( "SELECT p.id FROM #__hp_properties AS p "
. "\nLEFT JOIN #__hp_prop_types AS t ON t.id = p.type"
. "\nWHERE p.suburb ='".$property_suburb."' AND p.id ='".$property_id."' AND t.name ='".$type_name."' LIMIT 1"
);
$property_id = $database->loadResult();

$_GET['task'] = "view";
$_REQUEST['task'] = "view";
$_GET['id'] = $property_id;
$_REQUEST['id'] = $property_id;
$QUERY_STRING .= "&task=view&id=$property_id";

Works for me. It highly depends on the number of /example/example/ you have. I just fiddled a little bit and it worked, thank god.
Reply With Quote
  #9  
Old 10-25-2005, 05:00 PM
Kimon Kimon is offline
Member
 
Join Date: Feb 2005
Location: Greece
Posts: 34
Default

Bump...

Nice all that, and many thanks for sharing, but I would like some insight from the developers b4 messing with HP files, Alex maybe...
I'm afraid that I might come up with brokken SEO links if I hack the files, and then an upgrade comes out.
I also found an intresting post here: http://forum.joomla.org/index.php/topic,14060.0.html , from someone facing a similar prob.
Looks like Joomla has an integrated machanism to prevent this...with the reverse way, preventing naming at the first place , I guess it works only with the core thow.
Anyway, property naming problem is present with adv. SEF, because of the limited ways the properties can be named, if you have to follow the "Property type - Area" naming schema, like I do.
In my case I must be able to have properties with the same name.
Also, implementing a mechanism like the one mentioned above, wouldn't help in my case. It would only forbid me publishing properties to prevent url errors.
When I turn off SEF I can see that the default URL contains some sort of id#, can't this be included at the SEF generated links somehow? I thought that SEF support for individual components was comming from the (individual) developers, so giving an option about url rewright conditions can't be THAT hard..

Or at least I think so so, please....

Thanks anyway.

PS.

Plz, plz, plz, forgive my English.
Reply With Quote
  #10  
Old 10-25-2005, 05:05 PM
vanwel vanwel is offline
Senior Member
 
Join Date: Mar 2005
Posts: 200
Default

Hi,

I understand that you don't like to go away and hack into the files. But my solution is working pretty well and the SEF is displaying the id numbers like you want to!

Check my site at www dot b0gtrad3r dot nl
Reply With Quote
  #11  
Old 10-26-2005, 12:29 AM
ruigato ruigato is offline
Mosets'd
 
Join Date: Aug 2005
Location: Portugal
Posts: 127
Default

Quote:
Originally Posted by vanwel
Hi,

I understand that you don't like to go away and hack into the files. But my solution is working pretty well and the SEF is displaying the id numbers like you want to!

Check my site at www dot b0gtrad3r dot nl
site link?
Reply With Quote
  #12  
Old 10-26-2005, 03:05 AM
vanwel vanwel is offline
Senior Member
 
Join Date: Mar 2005
Posts: 200
Default

Quote:
Originally Posted by ruigato
site link?
www dot b0gtrad3r dot nl


- replace 'dot' with '.'
- replace '0' with 'o'
- replace '3' with 'e'

I don't want to create irrelevant forum links to my site. Hence the 'coding'...
Reply With Quote
  #13  
Old 10-26-2005, 03:09 AM
Alex Alex is offline
Mosets'd
 
Join Date: Dec 2004
Location: London
Posts: 2,046
Send a message via MSN to Alex
Smile

URL obfuscating? Interesting
__________________
Alex,
Custom vBulletin/Joomla! Developer
For sale: Joomla.cc & Joomla.ws
Reply With Quote
  #14  
Old 10-26-2005, 03:19 AM
vanwel vanwel is offline
Senior Member
 
Join Date: Mar 2005
Posts: 200
Default

Yes, I don't want people searching for my company name and finding this forum for my own website, although I don't think that is a big chance

By the way, Alex, what do you think of my solution? Seems to work alright?
Reply With Quote
  #15  
Old 10-26-2005, 09:09 PM
mgpeace mgpeace is offline
Junior Member
 
Join Date: Jul 2005
Posts: 6
Default

Quote:
When using SEF Advance, the search function doesn't work anymore.
I get the http://www.mydomain.com/advsearchr/stringwithvariables
with the message that there are no results.
When I turn on the debug mode, I can see the non SEF results and the string it shows there, DOES give me the search results. No idea where it goes wrong.
Damn... paid 40 dollars for it.
Wrong si trailing slashes "/" in new version of Sef Advance, use old version.

From sakic.net:
What's new in version 4.2?....
"- A trailing slash "/" get appended to URLs to create a folder effect
When calling URL without extension or trailing slash, one gets appended automatically to make appearance of a real folder."
Reply With Quote
  #16  
Old 10-26-2005, 09:13 PM
mgpeace mgpeace is offline
Junior Member
 
Join Date: Jul 2005
Posts: 6
Default

My version of sef_ext.php

Url is:

mydomain.com/hotproperty/type_name/property_name/property_id/
Attached Files
File Type: zip sef_ext.zip (4.4 KB, 381 views)
Reply With Quote
  #17  
Old 10-26-2005, 09:27 PM
vanwel vanwel is offline
Senior Member
 
Join Date: Mar 2005
Posts: 200
Default

Hmmm... So, you are using the advanced search with the GET method?
And can you order your search results by price, suburb etc?
Also with sef enabled?

That would be nice...
Reply With Quote
  #18  
Old 11-03-2005, 07:50 PM
vanwel vanwel is offline
Senior Member
 
Join Date: Mar 2005
Posts: 200
Default

Discovered a nasty thing.

When someone puts a " ' " in the name of the property, you get a sef url with a '%' which doesn't work.
How to solve this?
Reply With Quote
  #19  
Old 11-05-2005, 09:09 PM
Kimon Kimon is offline
Member
 
Join Date: Feb 2005
Location: Greece
Posts: 34
Default

I would still like to have some insight from the developers about all this
Afrer all, it is a problem that all users of HP will have to deal with when using SEF advance and having many properies at the db.
Right now, the url rewright scheme, without property id in it, demands unique property names, and that can be a problem when dealing with properies.

Thanks anyway.
Reply With Quote
  #20  
Old 11-05-2005, 09:15 PM
vanwel vanwel is offline
Senior Member
 
Join Date: Mar 2005
Posts: 200
Default

WHY JUST NOT USE MY SOLUTION???
Reply With Quote
  #21  
Old 11-05-2005, 10:27 PM
Kimon Kimon is offline
Member
 
Join Date: Feb 2005
Location: Greece
Posts: 34
Default

Quote:
Originally Posted by vanwel
WHY JUST NOT USE MY SOLUTION???
Because I (unfortunately) don't understand php, and I can't guess what kind of probs I will possibly face when a new version of HP comes.
Like if the links created with the modified sef, and allready stored at the search engines worldwide will still work, or result nasty 404 error codes that will penaltise my site ranking and lead my visitors to my 404 page.
Isn't that a good enough reason?
Anyway, it's not a development site, and i will not mess with the core of HP without asking the developers first about it.

What's the reason to be ungry anyway?
I believe that your sollution most probbably works ok, and I thank you for the time and the efort you put into it,
but what is wrong about trying to be in the safe side?
You should not be mad about it...

Thanks for the input anyway.
Reply With Quote
  #22  
Old 12-22-2006, 12:46 PM
Whitelion Whitelion is offline
Member
 
Join Date: May 2006
Posts: 32
Question hack the sef_ext.php file to show in the url: type, country, suburb, name, and ID

Hello...
Really good hack for sef advance..
My questions is:
Is there anyway to hack the sef_ext.php file to show in the url: type, country, suburb, name, and ID of the property?

for example:
/Hotproperty/Houses/Argentina/Buenos_Aires/3_Bed_Apartment/122.html

I was trying to doit, but i could not make it work.
Any help?..
Thanks.
Best regards from argentina.
Reply With Quote
  #23  
Old 01-24-2007, 12:20 AM
jets jets is offline
Mosets'd
 
Join Date: Nov 2006
Location: Clearwater, Florida
Posts: 6
Default If your going to answer a post why not try to help????

Quote:
Originally Posted by Alex View Post
URL obfuscating? Interesting
I purchased your software, purchased SEF Advanced and now it's useless to me.
I can't use this if having two names the same confuses your script.
Reply With Quote
  #24  
Old 11-25-2008, 03:45 AM
Yatko Yatko is offline
Mosets'd
 
Join Date: Jun 2008
Location: USA
Posts: 19
Exclamation Yes, this works!

the file to edit is /components/com_hotproperty/sef_ext.php
and if still doesn't work go to sh404SEF Configuration, select "By component"-tab and select "Do not override sef_ext" for hotproperty.

Last edited by Yatko; 11-25-2008 at 04:08 AM.
Reply With Quote
  #25  
Old 11-25-2008, 04:08 AM
Yatko Yatko is offline
Mosets'd
 
Join Date: Jun 2008
Location: USA
Posts: 19
Default Country in the URL

Quote:
Originally Posted by Whitelion View Post
Hello...
Really good hack for sef advance..
My questions is:
Is there anyway to hack the sef_ext.php file to show in the url: type, country, suburb, name, and ID of the property?

for example:
/Hotproperty/Houses/Argentina/Buenos_Aires/3_Bed_Apartment/122.html

I was trying to doit, but i could not make it work.
Any help?..
Thanks.
Best regards from argentina.
change these lines in the code provided by vanwel:
$database->setQuery( "SELECT t.name AS type_name, p.suburb AS property_suburb, p.id AS property_id FROM #__hp_properties AS p"

change to:
$database->setQuery( "SELECT t.name AS type_name, p.country AS property_country, p.suburb AS property_suburb, p.id AS property_id FROM #__hp_properties AS p"
Reply With Quote
  #26  
Old 01-25-2010, 04:20 PM
huynq huynq is offline
Junior Member
 
Join Date: Jan 2010
Posts: 1
Default

Quote:
Originally Posted by mgpeace View Post
My version of sef_ext.php

Url is:

mydomain.com/hotproperty/type_name/property_name/property_id/
i'm can't download attach file, please send email to me : huy@tacdat.vn
Thank's
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Extension allows Hot Property users to display availability status herohat Hot Property Discussions 3 07-16-2006 06:14 PM
Unique Property Reference Number SteveB Hot Property Troubleshooting and Problems 9 02-17-2006 09:45 AM
Property listing display goldenway Hot Property Troubleshooting and Problems 5 10-12-2005 11:58 PM
visible unique number for each property Lumbo Hot Property Discussions 1 08-17-2005 02:34 PM
is any way to display more fields in property manager bytefantasma Hot Property Troubleshooting and Problems 3 07-12-2005 06:29 AM


All times are GMT +8. The time now is 05:14 AM.

Copyright © 2005-2010 Mosets Consulting

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.