• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Inserting line break in script

Renada

Active member
#1
Hi,

Not sure if this is the right section for this but I know Brogan will move me if not :)

I have a slideshow module that I'd like to use on my front page (using Jaxel's portal). It's very basic, just a line of images that link to specific messages or forums. What I'd like to do is put a line of text under each image but everything I try results in breaking the script.

This is one line of the code:

Code:
leftrightslide[0]='<a href="http://"><img src="http://www.xxxxx.com/community/forums/images/health.jpg" width="160" height="160" border="0">INSERT TEXT HERE</a>'  OR HERE
Is this possible or do I need to find something else?

Thanks,
Renada :)
 

Brogan

XenForo moderator
Staff member
#2
As this isn't really XenForo related, I'm afraid it doesn't really fit in general support.

What you're trying to do will require some additional HTML and CSS but it's difficult to say without seeing the script in its entirety, or how it currently outputs.
 

Lawrence

Well-known member
#3
Hi,

This is one line of the code:

Code:
leftrightslide[0]='<a href="http://"><img src="http://www.xxxxx.com/community/forums/images/health.jpg" width="160" height="160" border="0">INSERT TEXT HERE</a>'  OR HERE
Is this possible or do I need to find something else?
As Brogan stated we would need to see the script to be sure. The line of php you posted is missing the ";" at the end though.

Try this:

Code:
leftrightslide[0] = '<a href="http://"><img src="http://www.xxxxx.com/community/forums/images/health.jpg" width="160" height="160" border="0"><br />INSERT TEXT HERE</a>';
 

Renada

Active member
#4
As Brogan stated we would need to see the script to be sure. The line of php you posted is missing the ";" at the end though.

Try this:

Code:
leftrightslide[0] = '<a href="http://"><img src="http://www.xxxxx.com/community/forums/images/health.jpg" width="160" height="160" border="0"><br />INSERT TEXT HERE</a>';
Hi,

I'm using this script - http://www.dynamicdrive.com/dynamicindex14/leftrightslide.htm from DynamicDrive. The code doesn't have that ; at the end of the lines though.

Thanks again :)

Renada
 

Brogan

XenForo moderator
Staff member
#5
It's using a table layout so you could rewrite the script to add another row below the images for the text.
 

Renada

Active member
#6
It's using a table layout so you could rewrite the script to add another row below the images for the text.
Rewrite the script???? <falls off chair> Ok I've recoverd now lol. Could you please tell me where and how I start? I'm very good at farkling things on my own but not good at making things work :)

Regards,
Renada
 

Brogan

XenForo moderator
Staff member
#7
Well I only had a quick look at it but essentially you would need to add another <tr> row with a set of <td> elements to contain the text.
 

DarkVodka

Formerly Wuebit
#8
Hi,

Not sure if this is the right section for this but I know Brogan will move me if not :)

I have a slideshow module that I'd like to use on my front page (using Jaxel's portal). It's very basic, just a line of images that link to specific messages or forums. What I'd like to do is put a line of text under each image but everything I try results in breaking the script.

This is one line of the code:

Code:
leftrightslide[0]='<a href="http://"><img src="http://www.xxxxx.com/community/forums/images/health.jpg" width="160" height="160" border="0">INSERT TEXT HERE</a>'  OR HERE
Is this possible or do I need to find something else?

Thanks,
Renada :)
PHP:
leftrightslide[0]='<a href="http://"><img src="dynamicbook1.gif" border=1><br />blah</a>'
 

Lawrence

Well-known member
#9
Ahh, JS, :p

You can't add anything to that script that will cause a line break as the positioning is thrown off for the rest of the images.

I'll take a look for you, though. :)
 

DarkVodka

Formerly Wuebit
#10
Ahh, JS, :p

You can't add anything to that script that will cause a line break as the positioning is thrown off for the rest of the images.

I'll take a look for you, though. :)
I tested the above and it worked fine Lawrence (I also see you posted the same before me, I didn't see that till now. Was all in a template tho)
 

Lawrence

Well-known member
#11
hmmm, I tried the break in mine and it left one image above the rest (I used 5 images).

Though I do have a working solution, that is not pretty, lol.

I'll post it here if the <br /> doesn't work for Renada
 

Lawrence

Well-known member
#15
Don't thank me quite yet. I have it working correctly in Firefox, but not IE. IE handles the positioning and floats differently than FF.

The script is pretty old. I would recommend finding another one, and in the mean time to not use text in this one.

I'll play with it a bit more tomorrow.
 

Renada

Active member
#16
Don't thank me quite yet. I have it working correctly in Firefox, but not IE. IE handles the positioning and floats differently than FF.

The script is pretty old. I would recommend finding another one, and in the mean time to not use text in this one.

I'll play with it a bit more tomorrow.
Thanks Lawrence :) I know it's an old script but I've not been able to find another one that works in this "conveyor belt" fashion.

I'll have another look around the web while I wait to see if you can beat this one into submission :)

Renada
 

Renada

Active member
#17
Don't thank me quite yet. I have it working correctly in Firefox, but not IE. IE handles the positioning and floats differently than FF.

The script is pretty old. I would recommend finding another one, and in the mean time to not use text in this one.

I'll play with it a bit more tomorrow.
Hi Lawrence,

I think I have it working now. I found a slightly altered version of that script and I think it's going to do what I want. I'll let you know :)

Thanks to you,Vodka and Brogan for trying to help :)

Regards,
Renada :)