Results 1 to 6 of 6

Thread: Dropdown menu w/ desc in php-nuke and SQL

  1. #1
    Join Date
    Nov 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Dropdown menu w/ desc in php-nuke and SQL

    hi there
    i hope you guys can help me
    because you are my last hope

    before i start i must explain
    i got a php-nuke site
    on this site got a drop-down block with links to several radiostations (CDC_Radio-block if you know it)
    when i select one of those stations i get a content under the dropdownmenu

    after three years, i collect more then two stations
    in other words, currently there are 30 stations with over 70 links

    the block i use is "hard code"
    so i must edit this thing everytime i want to change something
    and you can imagine, it's not funny anymore
    i uplodet the block so you can see what i mean.
    http://www.destros-world.de/files/block-CDC_radio.txt

    so, i decide to recode this block so that i can use it with the SQL DB and the admin menu from nuke

    work great, i can set categories, pages (on top and on button) and the pages are shown right in the cat's

    my problem is that the content is not shown right (btw. sry for the bad english)

    as an example
    i got three categories with different pages

    "startpage"
    cat 1
    -page 6
    -page 8
    cat 2
    -page 3
    -page 5
    cat 3
    other pages

    my problem is, when i click on page 6, i get the content of page 1
    when i click on page 8, i get the content of page 2
    and so on

    i really don't know any further
    and because u got this code on your page too
    http://www.dynamicdrive.com/dynamici...bodescribe.htm
    you eventually know why

    here is the current code of the block
    http://www.destros-world.de/files/bl...ntentblock.txt

  2. #2
    Join Date
    Nov 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    no one any idea
    it would be really great when i would get a solution for this

    (sry for push)

  3. #3
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    It is not terribly likely that you will get a response here in the MySQL section. From what I can tell it is the least visited forum in this message board. I am not really sure why. My guess is that MySQL is frustrating for a lot of people.

    Your english is pretty good by the way. It is better than many others where English is their first language. I blame instant messenger first for the degradation of proper grammar.

    php-nuke is not really my forte (forte = area of expertise). You might have better luck asking for help in the PHP forum or Dynamic Drive scripts help sections.

    I know you need a bit of help, but that is a lot of code to read through and I am not very sure what you are asking for. Is there a page that you have that I can look at so I can see your code in action? Can you give an example of what a very simple, yet ideal version of what your page would look like in HTML/CSS format? What the visitor would see in other words. To do this you can write a sample file with only a few results and post the demo page and then we can move from there. Could you also post what the format is of your tables? What the columns are of each table.

    If I write a response it will most likely be in some sort of PHP/MySQL format, because that is what I know.
    To choose the lesser of two evils is still to choose evil. My personal site

  4. #4
    Join Date
    Nov 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    well, i posted this because i thought it was a php/sql problem
    but i found it out, in the original code, the "assignment" of the $pid and $text works with the java (ore what this code should be) code below

    to get this work with sql i must set it specially
    from this
    onChange=\"displaycontent(document.form1.select1.selectedIndex)
    to this
    onChange=\"displaycontent(document.form1.select1.options[form1.select1.selectedIndex].value)

    now the content shows right to the $pid

    but now i got an other problem

    when i write a text
    i must write it without "line breaks"
    i don't mean <br>
    i mean "enter"

    in other words, i must write the code i one line
    by the way
    i got this problem also at the original block

    otherwise the complete block disapears

    in an other forum one user tell me i should try <<endofhtml
    but i hear that code the first time
    and don't really know what i should do with this

    you can see the block in action on my page
    it is called web radio block (ore that one with the alien)
    but that is not the one with SQL

  5. #5
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    My best suggestion for you is to repost your question in either the javascript forum or the php forum. You are asking about languages and situations that I am not familiar with. Normally you are not supposed to double post, but if anyone complains just tell them I suggested it. I doubt anyone will be upset though.

    I didn't want you to think that I was ignoring you. I just can't help you here except to recommend where you can get better help.
    To choose the lesser of two evils is still to choose evil. My personal site

  6. #6
    Join Date
    Nov 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    so, finally
    i got it, and the next time i ask the right people first

    don't work:
    Code:
    $content .= "showcontent[$pid]='$text'\n";
    work:
    Code:
    $content .= "showcontent[$pid]=\"" .str_replace('"', '\'', str_replace("\n", "", str_replace("\r", "", ($text)))) ."\";\n";

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
  •