Sign Up for OSTraining

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Sticky Feature in FW Real Estate

Sticky Feature in FW Real Estate 9 months 2 days ago #54245

  • jackibar
  • jackibar's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 509
  • Karma: 0
I have 2 situations where I believe they call it "sticky" - where for some reason the php code is "remembering" the last setting for viewing a served page. For example, in Workforce, if you do a "Search" and then go back to your listings, it will keep whatever you had in the search field intact.

Also, in my Real Estate component (FW Real Estate) if you click on a property and want to view the "Details" - it "remembers" the last tab you viewed and brings that up instead of the "Details" view. I want to override this behavior and I know it's to do with php, but not sure what code I'm looking for! Going to attach a couple of screenshots to explain... (Using Joomla 2.5.6
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 9 months 2 days ago #54248

  • Nick
  • Nick's Avatar
  • OFFLINE
  • Administrator
  • Posts: 16726
  • Thank you received: 371
  • Karma: 54
Hi Jacki,

Try replicating it and then clear your cache. Does it still do it?

Then try replicating it and then clear your cookies. Does it still do it?

Knowing those answers would be helpful in solving the problem.

Kind regards,
Nick
Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 9 months 2 days ago #54250

  • jackibar
  • jackibar's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 509
  • Karma: 0
Ok, clearing the cache made no difference. When I cleared the cookies, the first time I clicked on View Details, it did go to that tab like I want. However, the next time I went back to the property listings and clicked on View Details it then took me back to the Maps tab instead.
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 9 months 2 days ago #54255

  • Nick
  • Nick's Avatar
  • OFFLINE
  • Administrator
  • Posts: 16726
  • Thank you received: 371
  • Karma: 54
Hi Jacki,

OK, try the cookie clear one more time just so you're sure.

Kind regards,
Nick
Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 9 months 2 days ago #54259

  • jackibar
  • jackibar's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 509
  • Karma: 0
Yep - Cleared cookies, clicked on a property "View Details" link and the detail page came up with View Details tab clicked on and displaying. Clicked on Maps tab. Went back to the property listings, clicked on another property View Details link, and it took me to Maps tab :(
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 9 months 2 days ago #54262

  • Nick
  • Nick's Avatar
  • OFFLINE
  • Administrator
  • Posts: 16726
  • Thank you received: 371
  • Karma: 54
Hi Jacki,

That's OK, at least you know it's being saved as a cookie now :) That's one part of the puzzle. Ed's going to reply shortly.

Kind regards,
Nick
Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 9 months 2 days ago #54264

  • edandrea
  • edandrea's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 3106
  • Thank you received: 7
  • Karma: 0
Hi Jackie,

FW Real Estate is a commercial component and we don't have any access to it. I tried their demo and it works properly. If you turn off other plugins does it start working properly?

Workforce is another commercial component. Have you tried either or both of them for support? This isn't a problem with Joomla itself, but looks like maybe a plugin conflict. You may have to fix the code in more than one place.

If it were me I would try to isolate the plugin that is causing the problem before I tried to edit the php code. Make sure they work individually before making them work together.

Ed
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 9 months 2 days ago #54277

  • jackibar
  • jackibar's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 509
  • Karma: 0
Thanks, Ed - I was just trying to see if I could learn what code is doing this since I"m trying to learn more about php...! I just went ahead and submitted a ticket to them...

Now the one in WorkForce - they are aware of the "sticky search" as they call it, but that's just how they want it to work. I'd still love to figure out how to change that myself :)
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 9 months 2 days ago #54279

  • edandrea
  • edandrea's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 3106
  • Thank you received: 7
  • Karma: 0
Tessa said she was going to look into it for "fun". I'll write her and tell her you are interested in finding out.

Cheers,
Ed
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 9 months 2 days ago #54282

  • jackibar
  • jackibar's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 509
  • Karma: 0
Thanks! Yes - I'm a programmer at heart and want to know not just "what" but "why" and "how" :)
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 9 months 2 days ago #54304

  • tessa
  • tessa's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3946
  • Thank you received: 134
  • Karma: 9
Hi Jackibar,

I just read through this tab and I'm actually quite interested what the code looks like that is causing this to happen.

If your site is live, I would be able to go into your FTP and try to track down the code.

Without viewing your site, I won't be able to do this, because I use Firefox's firebug to hint me where to find this page. :-)

So please email me your site URL and FTP credentials to:

tessafenwick (at) gmail (dot) com.

Please post here when you have sent me an email. :-)
Warm Regards,

Tessa Mero



Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 9 months 2 days ago #54323

  • jackibar
  • jackibar's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 509
  • Karma: 0
Sent, Tessa :)
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 9 months 2 days ago #54347

  • tessa
  • tessa's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3946
  • Thank you received: 134
  • Karma: 9
Hi Jackie,

I can't seem to replicate this one. Are you sure it didn't get fixed by the company that was looking at it according to your email?

Please double check and get back to me on this one. :-)


Thanks!
Warm Regards,

Tessa Mero



Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 9 months 2 days ago #54362

  • jackibar
  • jackibar's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 509
  • Karma: 0
Looks like they did already...! Oh, well - maybe I'll ask which script they changed so we can compare before and afters :)

If you want to help me figure out the other site that's doing a "sticky" search, that would be great - it's a similar thing. The site is at:

overcomingovereating.com/support/oo-friendly-therapists

If you type something in the Search field (try "judith" for example) - you get the results. But then if you click back on the breadcrumb link to "OO-Friendly Therapists" it takes you back to the supposed main listing page - but keeps the person you searched for in its memory somehow instead of showing the complete directory of everyone again. The only way I've figured to get the complete listing back is to click the search box again (leaving it empty) - which is just WEIRD to me! The company's tech support said they purposely implemented that "sticky search" feature for some reason - I guess some people saw some benefit to it!! But I want to learn how to override it :)

I'll email you the login for that site in case you do want to look at it with me...
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 9 months 1 day ago #54374

  • edandrea
  • edandrea's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 3106
  • Thank you received: 7
  • Karma: 0
YOu might want to look at this. It might give you a starting point for some research into this.

docs.joomla.org/Disable_all_cookies_for_...l_visitors_in_Joomla

Also in various forms there are ways of making it sticky, so some research into javascript and form elements might get you where you want to go.

Cheers,
Ed
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 8 months 4 weeks ago #54481

  • tessa
  • tessa's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3946
  • Thank you received: 134
  • Karma: 9
Jackibar,

Quick question, what happens when you disable the Joomla system cache? Does this sticky search still happen?

Warm Regards,

Tessa Mero



Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 8 months 3 weeks ago #54667

  • jackibar
  • jackibar's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 509
  • Karma: 0
It still does it with caching disabled... They have totally HARD-coded this feature in!!
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 8 months 3 weeks ago #54690

  • tessa
  • tessa's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3946
  • Thank you received: 134
  • Karma: 9
Jacki,

Have you talked to the developer of the component to remove it?

I looked at every cookie and getCookie on your site, and there is nothing that I see that stands out. Although I thought maybe the function saveEmployee() might have had something to do with it, but commenting it out didn't make any changes. This is definitely hard coded in a way that is beyond my knowledge. Good luck. :-D
Warm Regards,

Tessa Mero



Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 8 months 2 weeks ago #55394

  • jackibar
  • jackibar's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 509
  • Karma: 0
Tessa - I have an update for you on the first site - the FW Real Estate one that the company fixed... I asked them which script they changed and what code they used! Here was the code originally:
<script type="text/javascript">
window.addEvent('domready', function() {
	if ($('fwre-share-button')) $('fwre-share-button').addEvent('mouseover', function(ev) {
		$('fwre-share-panel').setStyle('display', '');
	});
	if ($('fwre-share-button')) $('fwre-share-button').addEvent('mouseout', function(ev) {
		$('fwre-share-panel').setStyle('display', 'none');
	});
	var tab = location.toString().match(/#(.+)/);
	if (tab && tab[1]) {
		switch (tab[1]) {
			case 'photos' :
				var el = <?php if (fwRealEstateHelper :: isJoomla16()) { ?>document.getElement('#fwrealestate dt.fwrealestate-item-photo');<?php } else { ?>$('fwrealestate-item-photo')<?php } ?>;
				if (el) el.fireEvent('click');
			break;
		}
	}
});
</script>

And here's what they added (the last few lines at the end):
<script type="text/javascript">
window.addEvent('domready', function() {
	if ($('fwre-share-button')) $('fwre-share-button').addEvent('mouseover', function(ev) {
		$('fwre-share-panel').setStyle('display', '');
	});
	if ($('fwre-share-button')) $('fwre-share-button').addEvent('mouseout', function(ev) {
		$('fwre-share-panel').setStyle('display', 'none');
	});
	var tab = location.toString().match(/#(.+)/);
	if (tab && tab[1]) {
		switch (tab[1]) {
			case 'photos' :
				var el = <?php if (fwRealEstateHelper :: isJoomla16()) { ?>document.getElement('#fwrealestate dt.fwrealestate-item-photo');<?php } else { ?>$('fwrealestate-item-photo')<?php } ?>;
				if (el) el.fireEvent('click');
			break;
		}
	} else {
		var el = <?php if (fwRealEstateHelper :: isJoomla16()) { ?>document.getElement('#fwrealestate dt.fwrealestate-item-details');<?php } else { ?>$('fwrealestate-item-details')<?php } ?>;
		if (el) el.fireEvent('click');
	}
});
</script>

Just thought you'd want to know :)
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 8 months 2 weeks ago #55421

  • Nick
  • Nick's Avatar
  • OFFLINE
  • Administrator
  • Posts: 16726
  • Thank you received: 371
  • Karma: 54
Looks like the difference is that they added:
else {
var el = <?php if (fwRealEstateHelper :: isJoomla16()) { ?>document.getElement('#fwrealestate dt.fwrealestate-item-details');<?php } else { ?>$('fwrealestate-item-details')<?php } ?>;
if (el) el.fireEvent('click');

Interesting :)

Kind regards,
Nick
Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please become a member of OSTraining to reply to this post.

Sticky Feature in FW Real Estate 8 months 2 weeks ago #55430

  • tessa
  • tessa's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3946
  • Thank you received: 134
  • Karma: 9
Hi Jacki,

I definitely figured it was extremely hardcoded in.

I'm so glad you got this information because it was killing me to know as well!

Have a great weekend!


Warm Regards,

Tessa Mero



Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please become a member of OSTraining to reply to this post.
  • Page:
  • 1

Sign Up for OSTraining

Open Source Training is not affiliated with or endorsed by the Joomla, WordPress or Drupal projects.
All product names and trademarks are the property of their respective owners.

Copyright 2013 Open Source Training, LLC. All rights reserved.