e107help.org Q&A
0 like 0 dislike


I feel like an idiot right now and need some help.


That is a page that should list some stuff from a database table, I had it working with some simple code but it kept repeating the table headers so I tried to fix it and ended up with that gist. I need some help if any one can do so.

e107 version e107 version 2.0.x
in Plugins by (459 points) 17 37 50
Posted a new comment to your gist :) ​Let me know if this is what you want.


Got it working thanks, next thing is making so the Server Types (Ventrilo, TeamSpeak3, Mumble) - the servers underthem have links, I tried adding this in the case area

    case 0:
      $sTypeName = LAN_VOI_TYPE_UNK;
      $sUrltS = '';
      $sUrltE = '';
    case 1:
      $sTypeName = LAN_VOI_TYPE_MUM;
      $sUrltS = '<a href="/viewers/vent/vent.php?id='.$server['voice_id'].'">';
      $sUrltE = '</a>';
    case 2:
      $sTypeName = LAN_VOI_TYPE_TS3;
      $sUrltS = '<a href="/viewers/vent/vent.php?id='.$server['voice_id'].'">';
      $sUrltE = '</a>';
    case 3:
      $sTypeName = LAN_VOI_TYPE_VEN;
      $sUrltS = '<a href="/viewers/vent/vent.php?id='.$server['voice_id'].'">';
      $sUrltE = '</a>';


But with no luck, can you shead the light on what I am doing wrong?
To be honest, I would recommend brainstorming on how you would like your plugin to function and how the end result should look like. Draw up some tables in HTML and see what information you want. Then re-design the database struture. For example, personally I would create one table which stores the server types (servertype id, name, link) then create another table with the servers (id, type, name, ip, port, whatever). This way you can create a dynamic code without having to rely on hardcoding the server types for example.

I don't mind helping you out with your last request, it's just that it might be a waste of time if you don't think about the end result first. You'll end up making incremental changes which are unneccesary. Start with the end result, then decide on the database structure, then start writing the code.



I got it working and set up as needed - (drank some coffee and brain works)


To get it to list the links I have to make some more switches and cases instead of putting them all in the same switch/case

1 Answer

0 like 0 dislike
Best answer
Moc has provided the awnser
by (459 points) 17 37 50
996 questions
1,389 answers
2,512 users