×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Inserting Code from TripAdvisor

Inserting Code from TripAdvisor 13 years 3 months ago #13775

  • leanne
  • leanne's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
I want to add the tripadvisor embed code to each hotspot and have found a way for articles by using Jumi which ensures JCE doesnt strip our necessary code for the widget to work

BUT the jumi does not work within the Hotspots

Is there a way to insert this code within the hotspots admin?

sample code (hopefully it wont get stripped)


Isle of Wight Zoo


 
            Isle of Wight Zoo
 
 

source from here www.tripadvisor.co.uk/ManagementCenter-g...f_Wight_England.html

Thanks for any help

Inserting Code from TripAdvisor 13 years 3 months ago #13776

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Is the code absolutely the same for all hotspots? You could perhaps insert it once in the template?

Inserting Code from TripAdvisor 13 years 3 months ago #13777

  • leanne
  • leanne's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
Hi, no the will be a new code for each hotspot!

The jumi gets around the jce stripping out the code but even when i deactivate the jce editor for hotspots, the embed code still doens wor

Any ideas!?

Thanks

Leanne

Inserting Code from TripAdvisor 13 years 3 months ago #13778

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
This is security ;)
Well, I guess for the backend you can make the modifications - at the end you trust your backend users right?

So, go to
components/com_hotspots/controllers/hotspots.php find this code (at around line 127)
		$filter	= new JFilterInput(array(),array(),1,1,1);
		$row->description	= $filter->clean( $description );
		$row->description_small	= $filter->clean( $descriptionSmall );
change it to
$row->description	=  $description ;
		$row->description_small	=  $descriptionSmall ;

Now when you disable the editor for the hotspots, the script tag should also be saved in the database....
But don't put any javascript in the short description, you risk to brake the loading of the hotspots on the map...

Let me know if this helps!

Daniel
  • Page:
  • 1
Time to create page: 0.106 seconds