Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 57

Thread: How to restore broken lines in links in my PHP editor?

  1. #11
    Join Date
    Oct 2012
    Posts
    180
    Thanks
    22
    Thanked 1 Time in 1 Post

    Default

    Quote Originally Posted by traq View Post
    that's javascript code. Are we talking about javascript now?
    Oops... I feel so dumb right now. It is a javascript file (after I checked it again). I am not a programmer so I kind of thought it was a PHP file. In any case, how do I eliminate new lines using the example above between < and > in HTML links.

    Thank you.

    PS. Please, do not tell me I am confusing all of you. I realize I did. I just need to find a simple solution to this and I know it is possible to do.

  2. #12
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    OK - so going back to what the guys have been asking you, what "markdown editor" are you using?

    There are probably inbuilt markup/formatting functions that can be adapted so its best that you give us a link/download that will allow us to modify what already exists.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. #13
    Join Date
    Oct 2012
    Posts
    180
    Thanks
    22
    Thanked 1 Time in 1 Post

    Default

    Quote Originally Posted by Beverleyh View Post
    OK - so going back to what the guys have been asking you, what "markdown editor" are you using?

    There are probably inbuilt markup/formatting functions that can be adapted so its best that you give us a link/download that will allow us to modify what already exists.
    This is the one I am using:

    #
    # Markdown - A text-to-HTML conversion tool for web writers
    #
    # PHP Markdown
    # Copyright (c) 2004-2008 Michel Fortin
    # <http://www.michelf.com/projects/php-markdown/>
    #
    # Original Markdown
    # Copyright (c) 2004-2006 John Gruber
    # <http://daringfireball.net/projects/markdown/>
    #

  4. #14
    Join Date
    Oct 2012
    Posts
    180
    Thanks
    22
    Thanked 1 Time in 1 Post

    Default

    And by the way I do not need to eliminate white spaces. It's new lines that I want to disappear.

  5. #15
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    The PHP Markdown editor at http://www.michelf.com/projects/php-markdown/ ?

    There are 2 downloads on their site - which one?

    Also, have you already identified the file (that is part of markdown editor bundle) that needs to be modified? (to help speed things up)

    Additionally, can you provide an example of a working editor on your website that is exhibiting the 'hyperlink-new-line-space' problem so we can see the behaviour firsthand?
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  6. #16
    Join Date
    Oct 2012
    Posts
    180
    Thanks
    22
    Thanked 1 Time in 1 Post

    Default

    OK, I give up. Can a moderator lock this thread up? Seriously... This is a dynamicdrive forum, for crying out loud. Can SOMEONE tell me what code I should use to eliminate new lines between < and > in HTML links using THIS example:

    Code:
    text = text.replace(/^[ \t]+$/mg,"");
    ????????

    I have figured out a LOT of things on my own both in PHP and javascript with NO training. I am asking real programmers to help me with something as simple as this and I get nothing in return? It's kind of funny.

    Argh!

  7. #17
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    Can i just say that its probably not a good idea to bite the hand that feeds you - you may very well need help from these forums again in the future and youre not exactly forging good relationships in our community.

    3 people HAVE been trying to help you - 2 of them highly skilled moderators and all 3 of us very busy people.

    Weve remained polite and offered assistance dispite having very little to go on, so the attitude in your last post is uncalled for.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  8. #18
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by qwikad.com View Post
    And by the way I do not need to eliminate white spaces. It's new lines that I want to disappear.
    Newlines (\n or \r\n) are a form of whitespace.

    Quote Originally Posted by qwikad.com View Post
    OK, I give up. Can a moderator lock this thread up? Seriously... This is a dynamicdrive forum, for crying out loud. Can SOMEONE tell me what code I should use to eliminate new lines between < and > in HTML links using THIS example:

    Code:
    text = text.replace(/^[ \t]+$/mg,"");
    ????????

    I have figured out a LOT of things on my own both in PHP and javascript with NO training. I am asking real programmers to help me with something as simple as this and I get nothing in return? It's kind of funny.

    Argh!
    I understand that this might be frustrating. However, please consider that you are getting quite a bit in return. We're not running you in circles. We're asking very clear, straightforward questions about your situation so we can offer a solution to your problem.

    Your problem is not "simple" until it is understood. At this point, there are many things that are "unknown" and may have an impact on the solution - it's not one-size-fits-all.

    For example, we need to know "where" your <img> tag is (in a js variable? in part of a php script? simply text in the source code?) and how your code is acting on it. Without knowing these simple things, it is impossible to offer a useful suggestion - we'd just be making wild guesses, and they would probably be unhelpful.

    Is there some reason you cannot provide the information we've asked for?

    I'm going to leave this thread open for another 24 hours.

    qwikad.com, please reply during that time if you'd like to offer more information. We would love to help you solve your problem.

    everyone else, please refrain from posting in the meantime.


  9. #19
    Join Date
    Oct 2012
    Posts
    180
    Thanks
    22
    Thanked 1 Time in 1 Post

    Default

    Quote Originally Posted by traq View Post
    Newlines (\n or \r\n) are a form of whitespace.



    I understand that this might be frustrating. However, please consider that you are getting quite a bit in return. We're not running you in circles. We're asking very clear, straightforward questions about your situation so we can offer a solution to your problem.

    Your problem is not "simple" until it is understood. At this point, there are many things that are "unknown" and may have an impact on the solution - it's not one-size-fits-all.

    For example, we need to know "where" your <img> tag is (in a js variable? in part of a php script? simply text in the source code?) and how your code is acting on it. Without knowing these simple things, it is impossible to offer a useful suggestion - we'd just be making wild guesses, and they would probably be unhelpful.

    Is there some reason you cannot provide the information we've asked for?

    I'm going to leave this thread open for another 24 hours.

    qwikad.com, please reply during that time if you'd like to offer more information. We would love to help you solve your problem.

    everyone else, please refrain from posting in the meantime.

    traq I see that you have some authority here. OK. It's NOT just the new lines that I need to get rid off. I can do that. I did it in the past. They are the new/broken lines between < and > that I can't figure out how to get rid of. Just like it is in the example:

    Code:
    <img src="http://something.com/images/image.png"
    border="0">
    Let's say someone cuts and pastes this code into my editor, I want it to automatically become this:

    Code:
    <img src="http://something.com/images/image.png" border="0">
    Can you see the difference? Is it really this hard for someone who is a js/php programmer?

    Use this analogy to do this:

    Code:
    text = text.replace(blah blah blah);
    Thank you, again. Man, I am sweating as I am typing this. I thought it would be a simple question/answer thing. If you look up the beginning of this thread, this is exactly what I asked.

  10. #20
    Join Date
    Oct 2012
    Posts
    180
    Thanks
    22
    Thanked 1 Time in 1 Post

    Default

    I mean I confused js with php in the beginning of the thread, but if someone offered a solution with preg_replace, I would change in into text = text.replace... but nobody did. I just don't know what should go instead of the "blah blah blah" part...

Similar Threads

  1. How to create a broken links checker from scratch
    By SR123 in forum Looking for such a script or service
    Replies: 0
    Last Post: 06-03-2009, 03:03 PM
  2. Restore slide position!!!
    By shlajfka in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 11-25-2008, 01:04 PM
  3. links at the center appear broken
    By leonidassavvides in forum HTML
    Replies: 1
    Last Post: 04-23-2008, 02:49 PM
  4. Program to check broken links?
    By Freeman in forum The lounge
    Replies: 6
    Last Post: 08-24-2007, 04:04 PM
  5. Code Restore... (need help)
    By Harlem Of Nem in forum JavaScript
    Replies: 5
    Last Post: 08-06-2007, 08:03 AM

Bookmarks

Posting Permissions

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