Author Topic: Html in image details  (Read 5960 times)

0 Members and 1 Guest are viewing this topic.

Offline olgaart

  • Newbie
  • *
  • Posts: 45
    • View Profile
    • FotoClub
Html in image details
« on: May 01, 2008, 06:53:15 PM »
Hello everybody,
I have one problem or question: what is the difference in html-code usage for image description from admin panel and by user?
E.g. code (for including audio file)
<embed src="http://www.fotoclub.robertmagel.de/music/kroshka.enot.avi.audio1.mp3" loop="false" autoplay="true" width="200" height="50"></embed>
is working from admin center, but is not working when a user writes it in description-

My site http://www.fotoclub.robertmagel.de/
 4images 1.7.5 

Many thanks  for any suggestions.
« Last Edit: May 01, 2008, 08:36:03 PM by olgaart »

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: Html in image description
« Reply #1 on: May 01, 2008, 07:07:21 PM »
Hi,

html in image description for users  8O

You love hackers...


KurtW

Offline olgaart

  • Newbie
  • *
  • Posts: 45
    • View Profile
    • FotoClub
Re: Html in image description
« Reply #2 on: May 01, 2008, 07:13:58 PM »
but it is activated anyway, isnīt it? Something like <br> etc. works.
I do not like hackers, the idea was to make it possible to add music file with the picture.
Like this: http://www.fotoclub.robertmagel.de/details.php?image_id=202

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: Html in image description
« Reply #3 on: May 01, 2008, 07:20:53 PM »
i thing, it is better to work with a additional image field
Code: [Select]
image_bgsoundWhen a url is posted in this field in the uploadform, a player play the sound of this url in details

=> http://www.4homepages.de/forum/index.php?topic=20748.0


KurtW

Offline olgaart

  • Newbie
  • *
  • Posts: 45
    • View Profile
    • FotoClub
Re: Html in image description
« Reply #4 on: May 01, 2008, 07:42:40 PM »
definitely better, but I am too stupid to define an input type in that way, that the player would open automatically.
If I write in "details" template code
<embed src="{image_bgsound}" loop="false" autoplay="true" width="200" height="50"></embed>

the sound url is written as a link and at the end I get final code like this:

<embed src="<a href="http://www.fotoclub.robertmagel.de/music/xxx.avi.audio1.mp3" target="_blank" rel="nofollow">http://www.fotoclub.robertmagel.de/music/xxx.avi.audio1.mp3</a>" loop="false" autoplay="true" width="200" height="50"></embed>
« Last Edit: May 01, 2008, 08:26:20 PM by olgaart »

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: Html in image details
« Reply #5 on: May 02, 2008, 07:06:47 AM »
Hi,

use you a additionale imagefield?
have you as admin upload/edit the image?
Livedemo url?


KurtW

Offline olgaart

  • Newbie
  • *
  • Posts: 45
    • View Profile
    • FotoClub
Re: Html in image details
« Reply #6 on: May 02, 2008, 09:15:07 AM »
Hallo KurtW!
I used an additional image field image_bgsound as you said.
Added a new field in member upload form.
The problem is, how to write in "details" code, that audio file would play automatically, as the details page opens url as a link.
Tried <embed src="{image_bgsound}" loop="false" autoplay="true" width="200" height="50"></embed>
but what I get (end of the page http://www.fotoclub.robertmagel.de/details.php?image_id=222):
 http://www.fotoclub.robertmagel.de/music/kroshka.enot.avi.audio1.mp3" loop="false" autoplay="true" width="200" height="50">
Best regards, Olga

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: Html in image details
« Reply #7 on: May 02, 2008, 11:07:46 AM »
hello olgaart,

test this:

in includes7functions.php
search:
     
Code: [Select]
$additional_field_array[$key] = (!empty($image_row[$key])) ? format_text($image_row[$key], 1) : REPLACE_EMPTY;
change 1 to 0


KurtW

Offline olgaart

  • Newbie
  • *
  • Posts: 45
    • View Profile
    • FotoClub
Re: Html in image details
« Reply #8 on: May 02, 2008, 12:19:51 PM »
Hi KurtW,
it did not make any difference  :(

Offline olgaart

  • Newbie
  • *
  • Posts: 45
    • View Profile
    • FotoClub
Re: Html in image details
« Reply #9 on: May 02, 2008, 12:44:29 PM »
I changed it to "2", and its working! Many many thanks!
Olga