Results 1 to 5 of 5

Thread: Need to align an image

  1. #1

    Thread Starter
    Hyperactive Member GingerNut's Avatar
    Join Date
    May 2002
    Location
    Are those my feet?
    Posts
    372

    Need to align an image

    Hi,

    How can I get the following to align left:
    PHP Code:
    [img]$cfg_full_url_to_news_folder/uploads/".$file."[/img
    I tried adding align=left and align=\"left\" but neither of them work.
    How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?

    Global Freelancers | Web Traffic Analyser

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    What is your code to parse the [img] into a real image tag? I'm guessing a regular expression?

    If so, you'd have to modify the expression to handle the align="" portions.

    If you're not sure how to do this, I can supply some code.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3

    Thread Starter
    Hyperactive Member GingerNut's Avatar
    Join Date
    May 2002
    Location
    Are those my feet?
    Posts
    372
    Got it sorted. Had to use
    Code:
    \\x22 align=\\x22left\\x22
    How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?

    Global Freelancers | Web Traffic Analyser

  4. #4
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Is that a Regular Expression? I've never seen syntax like that before.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  5. #5

    Thread Starter
    Hyperactive Member GingerNut's Avatar
    Join Date
    May 2002
    Location
    Are those my feet?
    Posts
    372
    Code:
    [img]$cfg_full_url_to_news_folder/uploads/".$file." \\x22 align=\\x22left\\x22[/img]
    It's works like the buttons on this site when you're typing a message. You click on IMG and get the image tags.

    When I aligned it manually after placing the image in the editor I had to add

    Code:
    " align="left"
    before the closing tag.

    So, I had tried using " and \" and even \\" but just couldn't get it working, so I used \\x22 instead of the " and it worked perfectly.
    How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?

    Global Freelancers | Web Traffic Analyser

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width