Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Help with a PHP script
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Help with a PHP script

doughnetdoughnet Member
edited September 2016 in Requests

Hey all! Hope the start of September is going great for everyone. I was wondering if anyone was available to help me modify a PHP script. It's way past my standard knowledge of PHP scripting. Let me know if interested and I'll PM the script over.

This script is part of a CMS (customized) and it's specifically for the navigation menu. It outputs sections as a:
<li><a href="path.php">Section Name</a></li>
and also does drop down for pages. At the moment it can only have 1 drop down menu. I am trying to implement a specific name so that it can have another drop down (menu with a menu) by doing something like TopSection1=>Section2 and it will part the TopSection1 and put Section2 underneath it.

I probably am confusing everyone more than anything. Let me know if anyone is interested in helping me out or if can shed light on who/where I can inquire with.

Thank again for taking the time to read my post!

Comments

  • pbgbenpbgben Member, Host Rep
    edited September 2016

    Pseudo code:

    lvl1 => lvl2  
    
    if string contains => then split(string, '=>')  
    
    echo '<li>code for item splititem[0]</li>' lvl1  
     echo '<li>code for subitem splititem[1]</li>' lvl2  
    

    I can do this, but I'd have to charge.

    Thanked by 3mycosys doughnet GCat
  • My scripting brings all the boys to the yard

    @pbgben said:
    I can do this, but I'd have to charge.

    Thanked by 2pbgben netomx
  • LandofnoneLandofnone Member
    edited September 2016

    @mycosys said:
    My scripting brings all the boys to the yard

    @pbgben said:
    I can do this, but I'd have to charge.

    HAHA!

    Thanked by 1pbgben
  • @pbgben said:
    Pseudo code:

    lvl1 => lvl2  
    
    if string contains => then split(string, '=>')  
    
    echo '<li>code for item splititem[0]</li>' lvl1  
     echo '<li>code for subitem splititem[1]</li>' lvl2  
    

    I can do this, but I'd have to charge.

    Thank you for your interest. Any idea on what this would cost to do?

  • @doughnet said:

    @pbgben said:
    Pseudo code:

    lvl1 => lvl2  
    
    if string contains => then split(string, '=>')  
    
    echo '<li>code for item splititem[0]</li>' lvl1  
     echo '<li>code for subitem splititem[1]</li>' lvl2  
    

    I can do this, but I'd have to charge.

    Thank you for your interest. Any idea on what this would cost to do?
    @doughnet said:

    @pbgben said:
    Pseudo code:

    lvl1 => lvl2  
    
    if string contains => then split(string, '=>')  
    
    echo '<li>code for item splititem[0]</li>' lvl1  
     echo '<li>code for subitem splititem[1]</li>' lvl2  
    

    I can do this, but I'd have to charge.

    Thank you for your interest. Any idea on what this would cost to do?

    Is the css already there? Should literally be like 2 lines of code if it is.

  • doughnetdoughnet Member
    edited September 2016

    @Jonchun said:
    Is the css already there? Should literally be like 2 lines of code if it is.

    Doing the actual HTML for multiple nested menus is easy (as you implied). What I am having difficulties with is getting the PHP script which reads a database to process the information that it receives to do nested menus. Currently it just can do a single drop down menu. So a Section currently can have Pages within it. But I am trying to achieve a Section within a Section

    -Section1
    --Page1
    --Page2
    --Section2
    ---Page3
    ---Page4
    ---Page5
    

    The simplest way I could think of achieving this was by the inserted section name to be called: Section1=>Section2
    Having the '=>' be the separator/trigger, which has the Section2 know it should be nested under the Section1.

    I swear I'm just confusing everyone with this! Thank you again for your interest & help Jonchun!

  • @doughnet If you give me a pastebin of your code (PM me if you prefer), I can take a quick look. No guarantees. I think I understand what you're saying.

    Thanked by 1doughnet
  • @Jonchun said:
    @doughnet If you give me a pastebin of your code (PM me if you prefer), I can take a quick look. No guarantees. I think I understand what you're saying.

    Thanks!

  • century1stopcentury1stop Member
    edited September 2016
    Gender
    Female
              Teens
                         Yummy
                         Delicious
              Adults
              Singles
              Married
    Male
           Teens
                         Yummy
                         Delicious
           Adults
           Singles
           Married       
    

    dis?

  • doughnetdoughnet Member
    edited September 2016

    Uhh....yeah. Doing the HTML/CSS for that is easy, it's having poor existing php scripts to add this additional feature I guess would be best to describe. Currently it can already do your example aside from the Yummy & Delicious.

  • which means you're looking at adding Yummy n Delicious, right?

  • @century1stop said:
    which means you're looking at adding Yummy n Delicious, right?

    That is correct. Adding it in a way/method that keeps the existing PHP code the same and the database structure the same.

    That's why I was thinking something like naming a new section called Male=>Teens which then gets broken up and has Teens get nested under Male. That's where my scripting knowledge gets limited.

  • I'm no coder but if your script is like opencart or tomatocart, there will be more to it than css, parts will be in both admin and client section. Perhaps jonchun will be able to assist

  • pbgbenpbgben Member, Host Rep

    Hey @doughnet send me a snippit of a static multi-level code and I'll add the php in there for you.

    Thanked by 1doughnet
  • Im wondering why wordpress isnt used and be done with it :P

  • @pcfreak30 said:
    Im wondering why wordpress isnt used and be done with it :P

    Have to use an existing CMS that was custom made. Pretty much its just a CRUD (Create/Read/Update/Delete) with a pretty UX.

  • @pbgben said:
    Hey @doughnet send me a snippit of a static multi-level code and I'll add the php in there for you.

    Thanks for your help! I PM you the details to see if you are able to help out.

Sign In or Register to comment.