Support » Fixing WordPress » gb url-checker not working

  • hi!

    for this plugin ( the url-checker is not working. no matter what url i type in, it says “not a valid url”. i found the following code that might be the cause of this problem:
    preg_match ("/^(http(s)?:\/\/|www\.)+([a-z0-9-]+)*\.([a-z]{2,4})$/i", $_REQUEST[gburl])

    what’s wrong here?

    btw: this plugin is programmed in a horrible way. -.-

Viewing 15 replies - 1 through 15 (of 17 total)
  • (“/^(http(s)?:\/\/|www\.)+([a-z0-9-]+)*\.([a-z]{2,4})$/i”, $_REQUEST[gburl])

    This code is valid for URL like:

    This was tested by my self.
    URL check like url.tld will be probably implementation in the next major release.

    btw: this plugin is programmed in a horrible way. -.-
    this was a sunday project, i need a guestbook for wordpress and i dont found any. The code will also rewrite in the next version.

    Thank you for feedback!
    Daniel Schurter, Switzerland

    thanks for your reply.

    what about adding an url like:




    would you add a possibility to disable the url-checker? =)
    thanks a lot.

    This problem is solved.
    Now DMSGuestbook check correct the url format:

    And with parameters:

    Daniel Schurter

    Greetings –

    I’m using DMSGuestbook v.1.3.0 and believe that I’m experiencing the same problem. I’ve setup permalinks in this manner: “/%category%/%postname%/”. I have setup the plugin successfully and it appears on the page as desired,… but upon attempting to post it redirects to: “/index.php?page_id=40” (the ID is correct) and the page is blank.

    I’ve been programming for 10+ but am a WordPress newbie and am not understanding this thread. You state that the issue is solved, but I don’t follow. Would you be so kind as to elaborate with specifics?

    This is a great plugin and look forward to implementing on my site. Thanks in advance for your understanding and assistance.

    This thread describe the problem when your input an url in your guestbook form. (valid check)
    Some kind of url was not valid in a first version of guestbook and always the message appears “Invalid url adress!” when users type any url in the guestbook url input form.

    Have you seen this hint?
    Can be helpfull


    Thank you very much for your reply. I believe that I understand permalinks, but it would appear that the guestbook is not behaving properly within my structure.

    Could you give it a look? It’s at

    You’ll see that the guestbook appears fine, but upon attempting to post it redirects incorrectly.

    Many thanks!

    1.) Check your rewrite rules in your .httacces

    Otherwise, quick and dirty 🙂
    2.) Replace this code:

    <form action="<?=$url;?>/index.php?page_id=<?=$gb_page_id;?>" method="post">

    in dmsguestbook.php, line 456 with this one:

    <form action="<?=$url;?>/40/" method="post">

    40 ist your guestbook id

    Daniel Schurter

    Thank you so much for your assistance! I actually had to use the following:

    456:<form action=”<?=$url;?>/guestbook/” method=”post”>

    …but it works great now!

    Thanks again!

    FYI – Also had to edit lines 296, 299, 311 and 317 to correct the navigation.


    yes, i had forgotten this. 🙂

    Thanks Daniel –

    Is it possible to change the the chronological ordering of the guestbook entries? For example, as it is now:

    (1) Last Guest Entry
    (2) First Guest Entry

    Would like:

    (2) Last Guest Entry
    (1) First Guest Entry

    Replace DESC to ASC in the dmsguestbook.php file on the line 283


    Sorry, I should have been more specific… I’m hoping to edit the ($_REQUEST[itemnr]) item found on line 375. I believe I understand that you programmed it as a list item, but I am trying to brand the first post with (1) second post with (2) etc., regardless of ASC or DESC.

    (3) Third Post
    (2) Second Post
    (1) First Post

    (1) First Post
    (2) Second Post
    (3) Third Post

    It’s no big deal if it’s a problem, I can just eliminate the ($_REQUEST[itemnr]) tag altogether if necessary.

    Ok i understand you.
    Replace $_REQUEST[itemnr] with $dbresult->id

    This is the database id for every post, when you delete a post, like 23, the number 23 will never you see again.


    Daniel –

    I think that I finally have it setup the way I want it. I sincerely appreciate your patience and understanding while working through this. You’ve programmed a cool little plugin and I envy you your talent and skills. I wish we lived closer together so I could buy you a beer and pick your brain.

    If you have no objection, I’d like to edit your guestbook entry (thanks btw) to add a link to your plugin. If you don’t mind, please leave a URL to the page of your desire. Also, do you have an English version of your site?

    Thanks again!

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘gb url-checker not working’ is closed to new replies.