Jump to content

herghost

Members
  • Posts

    699
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

herghost's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

  1. Hi Guys Thanks for all your responses, the data is coming from an API into the minecraft extension bukkit, my actual results from query display as: "result": "success", "source": "getDirectory", "success": ["plugins/Essentials.jar", "plugins/Essentials/", "plugins/Essentials/config.yml", "plugins/Essentials/items.csv", "plugins/Essentials/upgrades-done.yml", "plugins/Essentials/warps/", "plugins/Essentials/worth.yml", "plugins/JSONAPI.jar", "plugins/JSONAPI/", "plugins/JSONAPI/config.yml", "plugins/JSONAPI/config_rtk.yml", "plugins/JSONAPI/methods.json", "plugins/JSONAPI/methods/", "plugins/JSONAPI/methods/permissions.json", "plugins/JSONAPI/methods/readme.txt", "plugins/JSONAPI/methods/remotetoolkit.json", "plugins/JSONAPI/methods/system.json", "plugins/JSONAPI/methods/world.json", "plugins/MinecraftRKitPlugin.jar", "plugins/PluginMetrics/", "plugins/PluginMetrics/config.yml"] } So all I am trying to do is extract the results that end in .jar and ignore the rest so I can have a list of installed plugins.
  2. Hi guys I was wondering if anyone could point me in the right direction with this. I am using JSON to return the contents of a directory and then using a foreach loop to print each one to a new row in a table. Is there anyway to filter the results? Basically I just want to show the files that end in a .jar extension? Currently all sub directories and files are shown, however all the files I need to pull will be in the main directory. This is what I am using: <?php foreach ($installedplugins1['success'] as $v) { echo "<tr><td>".$v."</td>"; echo "<td><a href='index.php?dp=".$v."'>Disable Plugin</a></td>"; } ?> Any hints or reading material? Cheers
  3. Hello everyone, this is one of my 1st attempts of using js, and its confusing me This is my code: <html> <head> <title></title> <script type="text/javascript"> var cats = ["electronics", "entertainment", "homeandgarden", "finance", "motoring", "fashion", "travel", "medical",]; var electronics = ["mobiles", "hi-fi"]; var entertainment = ["books", "dvds",]; function check() { document.getElementById("checkbox").checked = "checked"; } function visiblox(arrDiv, hs) { var disp = (hs) ? "none" : "block"; for(var x = 0; x < arrDiv.length; x++) { document.getElementById(arrDiv[x]).style.display = disp; } } function chk(what, item) { if(item) { visiblox(what, false); } else { visiblox(what, true); } } </script> <style type="text/css"> <!-- .hide { display: block; } .hide { display: none; } --> </style> </head> <body> <img src="images/electronics.png" onclick="javascript:check();"> <input type="checkbox" id="checkbox" onclick="chk(electronics, this.checked);"> <br> <input type="checkbox" onclick="chk(entertainment, this.checked);" checked> Entertainment<br> <br> <br> <div id="mobiles" class="hide">Mobiles</div><br> <div id="hi-fi" class="hide">Hi-Fi</div><br> <div id="books" class="hide">Books</div><br> <div id="dvds" class="hide">DVD's</div><br> </body> </html> Basically I am having some problems with the electronics input, it just doesnt display the divs when clicked, why is this?
  4. yes! this generally means that it is unneeded
  5. Ok, this is what I have found online and am trying to edit to my own needs: <html> <head> <title></title> <script type="text/javascript"> var cats = ["electronics", "entertainment", "homeandgarden", "finance", "motoring", "fashion", "travel", "medical",]; var electronics = ["mobiles", "hi-fi"]; var entertainment = ["books", "dvds",]; function visiblox(arrDiv, hs) { var disp = (hs) ? "none" : "block"; for(var x = 0; x < arrDiv.length; x++) { document.getElementById(arrDiv[x]).style.display = disp; } } function chk(what, item) { if(item) { visiblox(what, false); } else { visiblox(what, true); } } </script> <style type="text/css"> <!-- .hide { display: block; } .hide { display: none; } --> </style> </head> <body> <img src="images/electronics.png" onClick="chk(electronics, this.clicked);"> <br> <input type="checkbox" onclick="chk(entertainment, this.checked);" checked> Entertainment<br> <br> <br> <div id="mobiles" class="hide">Mobiles</div><br> <div id="hi-fi" class="hide">Hi-Fi</div><br> <div id="books" class="hide">Books</div><br> <div id="dvds" class="hide">DVD's</div><br> </body> </html> The check boxes work fine, however how would I get the image to achieve the same result? Thanks
  6. Thanks BlueSkyIS, looks like I have some reading to do!
  7. Hi everyone, Can anyone give me any pointers towards how to create a form like the listing add one on ebay? Basically the form fields are displayed depending on what type of product you have, I basically need something very similar where I have multiply categories but wish to have different inputs for each type? Many thanks
  8. Hi all, I am looking as a pet project to develop a review site, with the info stored in a database by id and the information grabbed bet get id and then displayed on a dynamic page, eg review.php?id=1 My question is this, if i throw keywords into the mix for each review, will search engines cache a review like this? Or would I need static pages for google etc to find the info? Thanks
  9. Hi all, I am having some problems with a tiny piece of code in .js // Images Directory imagesDir = "/wysiwyg/icons/"; On my wamp server, this link points to localhost/wysiwyg/icons/ - however it should appear like this localhost/mydirectory/subdirectory/wysiwyg/icons/ I know I could just type this in, however this script is going to be made available to different people on different domains. For the php in my scripts I have set a variable called $baseurl, which will be set on install. Is there anyway of parsing this value into the .js script? Or creating something similar? Thanks
  10. arse, kinda answered my own question there
  11. Hi all, How would i throw a php variable in this? Basically I want something Like header("Location, $baseurl/somepage.php")
  12. Does anyone know of a script that will display an ajax alert box? Basically I have a php form that adds a customer to the database, once it has entered the data, it populates a session called save and redirects back to the homepage. I then have an isset($_session['save']; Basically I want this box to pop up and display a message, then disappear after a few seconds. Anyone help?
  13. ah crap, perhaps I was making sure the script was doing what it was told, a bit like a small child, I told it twice to reiterate the point Cheers
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.