Indexhibit
Index + Exhibit

Login:

Created by
Daniel Eatock
Jeffery Vaska
And You

Indexhibit was updated to version 2.1.4 on April 10, 2017.

Problem with editing and "&"

 

Indexhibit version: Legacy
Thread is not resolved.

vmulot
FRANCE
8 year(s) ago
Permalink Post

hello,

I m inserting some html code like div and object & param
for inserting a flv player in the textarea of the "exposition". but i need to use the "&" caracter i tried & then save, then open the edit page again. the & became &.
if i close it and open it again, the & becomes a strange character.
i can"t find why. any help ? :)

Vaska A
UNITED STATES
8 year(s) ago
Permalink Post

Yep...it's an odd problem I've seen. The way I've gotten around this is to make a plugin that carries the object/param code so things are not double encoded.

vmulot
FRANCE
8 year(s) ago
Permalink Post

hmm in fact it seems that the pb appears only when i'm using for example &image =
&image becomes a strange character similar to the &

Vaska A
UNITED STATES
8 year(s) ago
Permalink Post

Yep...exactly. I've never understood why...I just found a way around it.

vmulot
FRANCE
8 year(s) ago
Permalink Post

can you explain me how you managed to do this plugin.?
in fact, i did something bad, i change the "core" so i can upload FLV files and generate html code (in asset/js/modEdit.js) and use a flv player like jplayer.

i'd like to do this but only with a plugin i can call from the textarea or something like that

Vaska A
UNITED STATES
8 year(s) ago
Permalink Post

ouch...there is no reason for you to edit core...seriously...totally wrong place to edit.

this is my super fast way of explaining this...you will need to tell me the parts you don't understand. but first off, there is a basic plugin tutorial in the help/tutorials section.

make a file and call it 'plugin.myflv.php'...

in this file do something like...

  1. function myflv($filename, $width='400', $height='300', $prv_img='')
  2. {
  3. ¬†¬†¬†¬†$prv_img = ($prv_img != '') ? $prv_img : '';
  4. ¬†¬†¬†¬†$no = rand(1, 1000);¬†¬†¬†¬†
  5. ¬†¬†¬†¬†$out = ($wrap == 'inline') ? "<div id="player-$no" class='flash-flv'></div>n" : "<p id="player-$no"></p>n";
  6. ¬†¬†¬†¬†$out .= "<script type="text/javascript">n";
  7. ¬†¬†¬†¬†$out .= "var so = new SWFObject('" . BASEURL . "/files/player.swf', 'mpl', '$width', '$height', '7');n";
  8. ¬†¬†¬†¬†$out .= "so.addParam('allowfullscreen', 'true');n";
  9. ¬†¬†¬†¬†$out .= "so.addParam('allowscriptaccess', 'always');n";
  10. ¬†¬†¬†¬†$out .= "so.addVariable('displayheight', '$height');n";
  11. ¬†¬†¬†¬†$out .= "so.addVariable('file', '" . BASEURL . "/files/$filename');n";
  12. ¬†¬†¬†¬†$out .= "so.addVariable('height', '$height');n";
  13. ¬†¬†¬†¬†$out .= "so.addVariable('image', '" . BASEURL . "/files/$prv_img');n";
  14. ¬†¬†¬†¬†$out .= "so.addVariable('width', '$width');n";
  15. ¬†¬†¬†¬†$out .= "so.write('player-$no');n";
  16. ¬†¬†¬†¬†$out .= "</script>n";
  17. ¬†¬†¬†¬†return $out;
  18. }

this is assuming you are using the JW Player...and swfobject but the idea is the same for anything else.

in your textarea then you would call this up as...

  1. <plug:myflv 'filename.mov', '600', '400', 'preview_image.jpg' />

;)

vmulot
FRANCE
8 year(s) ago
Permalink Post

Ho thanks a lot for help! gonna check that :)

vmulot
FRANCE
8 year(s) ago
Permalink Post

Yeaaaah ! it works really great !
i don"t understand why i didn"t think to that before :-)

thanks a lot for help !

hrstuks
DENMARK
8 year(s) ago
Permalink Post

I've followed the steps and checked that there are no errors, but my site just stops working when copying the plugin to the plugins folder.

I get this error
Parse error: syntax error, unexpected T_STRING in plugin.myflv.php on line 7

  1. which is the line: $out = ($wrap == 'inline') ? "<div id="player-$no" class='flash-flv'></div>n" : "<p id="player-$no"></p>n";
papillonsouslalune
ITALY
8 year(s) ago
Permalink Post

est-ce que qu'un quelqu'un peut me le dire en français
comment installer une video sur le site ?
merci

pour le moment on a trouvé le moyem de copier le lin you toube
mais ce n'est pas très "pro"
merci
carine

lemathieu A
FRANCE
8 year(s) ago
Permalink Post

il faut uploader ta video quicktime via flash

cherche sur le forum "flash player" ou "JW Player"

marioguerson
ARGENTINA
7 year(s) ago
Permalink Post
  1. Hello, I tried this but it doesn't work...
  2. Here's my plugin:
  3. function myflv($filename, $width='400', $height='300', $prv_img='')
  4. {
  5. $prv_img = ($prv_img != '') ? $prv_img : '';
  6. $no = rand(1, 1000);    
  7. $out = ($wrap == 'inline') ? "<div id="player-$no" class='flash-flv'></div>n" : "<p id="player-$no"></p>n";
  8. $out .= "<script type="text/javascript">n";
  9. $out .= "var so = new SWFObject('www.maqe.com.ar/M/animation/animation.swf', 'mpl', '$width', '$height', '7');n";
  10. $out .= "so.addParam('allowfullscreen', 'true');n";
  11. $out .= "so.addParam('allowscriptaccess', 'always');n";
  12. $out .= "so.addVariable('displayheight', '$height');n";
  13. $out .= "so.addVariable('file', '" . BASEURL . "/files/$filename');n";
  14. $out .= "so.addVariable('height', '$height');n";
  15. $out .= "so.addVariable('image', '" . BASEURL . "/files/$prv_img');n";
  16. $out .= "so.addVariable('width', '$width');n";
  17. $out .= "so.write('player-$no');n";
  18. $out .= "</script>n";
  19. return $out;
  20. }

Wait! I can't paste the complete code. Why?

marioguerson
ARGENTINA
7 year(s) ago
Permalink Post

Oh... the code didnt show right inthe preview... well...

The only line I changed is line 9.

Should I change anything else?

  1. And in my text area I wrote:
  2. <plug:myflv 'www.maqe.com.ar/M/animation/MAQE REEL 2008.flv', '800', '600', 'preview_image.jpg' />
marioguerson
ARGENTINA
7 year(s) ago
Permalink Post

my page

marioguerson
ARGENTINA
7 year(s) ago
Permalink Post

At first the plugin was named plugin.etc...
and I was getting the code displayed at the top of the page.
Then, I changed the file's name to exhibit.etc...
And now the exhibit is empty!

Showing 1 - 15 of 15 posts in Forum » Customize » Problem with editing and "&"
 

This thread has been closed, thank you.