Jump to content

Mercifull

Members
  • Posts

    12949
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Mercifull

  1. There's a massive great button when you login game now which says "vote". Does anyone know what happens if you click it? Does it automatically count as 'yes' or do you get a chance to confirm it? Looking at the massive spike in votes I'm assuming it automatically counts you as a yes. If it is that's piss poor consultation.
  2. New engine looks good. Can't wait for it to be released.
  3. Let's remember that they don't even have botwatch working in its limited form on 2007 servers yet at all. Only if it reaches 250k will Jagex actually do any work "possibility of integrating our modern anti-bot technology over time" and 500k to guarantee it "integration of anti-bot technology if necessary". All the old injection/reflection bots are going to swarm back into the game and people will be powerless to stop them.
  4. I think it'll be the complete opposite. Botting will be epidemic in 2007 servers as people too impatient in the race to the top cheat their way up either by botting directly on their characters or real world trading gold. It wouldn't surprise me one iota if the first whip to be claimed was done so by a botter/goldfarmer and sold for irl money.
  5. Current project is a new website for the radio station I work for FromeFM 96.6. The new www.frome.fm site will replace the old www.fromefm.co.uk with new branding (the current site just plonks the new logo in the old site). You will be able to listen to and download the back catlogue of archived shows as well as listening live using a html5 based player instead of flash which means it'll work on mobile phones and tablets too. The new site is built using wordpress with a responsive theme which resizes things depending on the screensize which means no separate design for mobiles compared to desktop. Plugins include: Custom self written ones to pull in the archived shows into a html5 player. This one requires a complex array of scripts to run in order such as Dircaster to read the contents of a particular folder, magpie or simplepie to convert that listing into rss and then parsing it to php readable code into the relevant show page (see recent threads on the subject) Post Tags and Categories for Pages - Does what it says on the tin Custom sidebars - to allow me to create more than one type of right side bar for different pages Display posts shortcode - to allow me to use shortcodes to create dynamic lists of pages in a specific category Shortcodes in Sidebar Widgets - lets me use the code from the above plugin within text widgets in sidebars Media replace - Lets me upload new versions of images rather than it being created under a separate filepath And a bunch of other simple ones to exclude certain pages from search and social network widgets, cookie law banner and announcement bar I've used the categories for pages plugin to make the site easier to manage as it not only allows me to use shortcodes to generate page listings but also helps administer the site by filtering in the pages admin panel. Can't show you the site in development as it's protected with a password but hope to provide some screenshots soon. :)
  6. My plugin might not even get used in the final version of the website lol but at least i'm learning something.
  7. /* Plugin Name: FromeFM Player Plugin Description: Enables shortcodes to generate audiojs players based on variables such as showname and number to pull from feed. Plugin relies on a special version of DirCaster placed in the /archive/ folder in order to work properly. Version: 0.6 License: GPL Author: Matt Sims Author URI: www.mattsims.com Contributors: Tripsis, Xena Dragon, JoWie, Obfuscator & Hedgehog (forum.tip.it) as well as rrikesh & brasofilo (stackoverflow.com) */ :D You've no idea how happy I am right now. I clapped my hands together so hard I scared the cats and now my palms are sore. rofl
  8. Ok I think I've worked it out. Thanks Obfuscator, running the Chrome thing gave the following error jQuery Uncaught TypeError: Property '$' of object [object Window] is not a function I then searched for this on stackoverflow and someone said that it was something to do with jquery in wordpress loading in no-conflict mode and to get around that for a specific script without turning it off entirely all I needed to do was replace $(function() { with jQuery(function($) { Really really happy! Thanks very much, I've added you into the credits of the plugin, not that anyone other than me can use it lol
  9. They bank, but there's so many of them that any attempts to make them bank early doesnt really make a difference. They give shoddy slayer xp anyway just kill the low level ones. It frustrates me just as much as you.
  10. It's ridiculous lol. Most of my errors have been simple to work out and my plugin has been evolving from very basic through the tests and now to the final leg where it's fallen over lol. The old site, which I didn't make, uses a flash player which works great every time (so long as you have a browser that plays flash) but I really really really want to move away from that format into something that works cross platform. I figured that rather than directly editing wordpress and theme files I would make it as a plugin. My theory was that it would be less of a headache when it came to updating wordpress either bug fixes, security patches or just new features in the future as the plugin would make it independent. Old site: http://www.fromefm.co.uk/
  11. Dreamweaver.... I've not used a WYSIWYG editor for years. I don't have it to check either sorry. Is there anything else I could use that's free. I'm writing this in Notepad++ and it appears to look ok to me.
  12. Another day another question. My wordpress plugin to enable me to use shortcodes to play individual mp3 files and podcasts is coming along nicely thanks to all your help here. I have now reached another brick wall which is causing me to go even greyer than I already was. The js script I am using is the full version of Audiojs http://kolber.github.com/audiojs/ which is a free html5 player with flash backup on old browsers. It works across all the main platforms including Android and iOS. My plugin has two parts. The first part utilises the following Wordpress shortcode [showplayer showurl=http://www.linktomp3.com/file.mp3 to output an audiojs player with the variable showurl. See code below. It's ever to slightly different to my previous post because I've changed from the built in magpierss (rss.php) to simplepie (feed.php) as the old one is apparently depreciated according to people at StackOverflow. // Individual show script below function showplayer_func($atts) { //extract the parameters and set defaults in case one isn't set by the user extract(shortcode_atts(array( 'showurl' => 'http://www.fromefm.co.uk/archive/sponsors/fromefm-luke.mp3', ), $atts)); return "<script> audiojs.events.ready(function() { var as = audiojs.createAll(); }); </script><audio src='$showurl' preload='none'></audio>"; } function register_shortcode2() { add_shortcode('showplayer', 'showplayer_func'); } add_action('init', 'register_shortcode2'); This WORKS... and I hate to use the word flawlessly... but it does. If now showurl is entered it successfully loads the FromeFM ident instead. If an incorrect url is entered then it shows an error that it failed to load the mp3 but that's ok. An example in action is here http://frome.me/ffm/?page_id=6 The problem is when I want to use the playlist version of the script (demo). As far as I can tell it's exactly the same code, just without the keyboard div and yet it doesn't work. It loads the list of podcast link and if I examine the source code of the page I can see that it's been loaded in but the actual html5 player bit doesn't appear. function showplaylist_func($atts) { //extracting the parameters and set defaults in case one isn't set by the user extract(shortcode_atts(array( 'show' => 'altfactor', 'showno' => '1000', ), $atts)); //now you have the variables $showname and $showno to play with //normal function code here include_once(ABSPATH . WPINC . '/feed.php'); $num_items = $showno; $feedurl = 'http://fromefm.co.uk/archive/dircasterX.php?show='.$show; $rss = fetch_feed($feedurl); if (!is_wp_error( $rss ) ) : // Checks that the object is created correctly // Build an array of all the items, starting with element 0 (first element). $rss_items = $rss->get_items(0, $showno); endif; $list = ""; foreach ($rss_items as $item ) { $title = $item->get_title(); $mp3link = $item->get_link(0); $description = $item->get_description(); $list .= "<li><a href='#' data-src='$mp3link'>$title - $description</a></li>";} return " <script> $(function() { // Setup the player to autoplay the next track var a = audiojs.createAll({ trackEnded: function() { var next = $('ol li.playing').next(); if (!next.length) next = $('ol li').first(); next.addClass('playing').siblings().removeClass('playing'); audio.load($('a', next).attr('data-src')); audio.play(); } }); // Load in the first track var audio = a[0]; first = $('ol a').attr('data-src'); $('ol li').first().addClass('playing'); audio.load(first); // Load in a track on click $('ol li').click(function(e) { e.preventDefault(); $(this).addClass('playing').siblings().removeClass('playing'); audio.load($('a', this).attr('data-src')); audio.play(); }); // Keyboard shortcuts $(document).keydown(function(e) { var unicode = e.charCode ? e.charCode : e.keyCode; // right arrow if (unicode == 39) { var next = $('li.playing').next(); if (!next.length) next = $('ol li').first(); next.click(); // back arrow } else if (unicode == 37) { var prev = $('li.playing').prev(); if (!prev.length) prev = $('ol li').last(); prev.click(); // spacebar } else if (unicode == 32) { audio.playPause(); } }) }); </script> <audio preload='none'></audio> <ol> $list </ol> "; } function register_shortcodes() { add_shortcode('showplaylist', 'showplaylist_func'); } add_action('init', 'register_shortcodes'); An example of it in action is here: http://frome.me/ffm/?page_id=48 The plugin also has the following code which puts the audio.js script in the header. This works ok. // Adds JS files relating to plugin function add_audiojs() { wp_register_script( 'audiojs', plugins_url( '/audiojs/audio.js', __FILE__ ) ); wp_enqueue_script( 'audiojs' ); } add_action('wp_enqueue_scripts', 'add_audiojs'); Entire plugin code shown below. Bear in mind it's messy with a lot of comments out while I'm still testing stuff. http://pastebin.com/Ne0d4T88
  13. It's working but I'm struggling with some js issues now. Thanks for your help. Probably going to call it a night for tonight though. Current full code below. See it in action here - http://frome.me/ffm/?page_id=48 <?php /* Plugin Name: FromeFM Player Plugin Description: Enables shortcodes to generate audiojs players based on variables such as showname and number to pull from feed. Plugin relies on a special version of DirCaster placed in the /archive/ folder in order to work properly. Ensure jquery is also enabled in Wordpress (should be by default). Version: 0.1 License: GPL Author: Matt Sims Author URI: www.mattsims.com Contributors: Tripsis, JoWie, Hedgehog (forum.tip.it/topic/317233-need-help-again-wordpress-plugin-assistance-scroll-down) */ // Ads JS files relating to plugin function add_audiojs() { wp_register_script( 'audiojs', plugins_url( '/audiojs/audio.min.js', __FILE__ ) ); wp_enqueue_script( 'audiojs' ); } add_action('wp_enqueue_scripts', 'add_audiojs'); function add_ffmjs() { wp_register_script( 'fromefmplayer', plugins_url( '/includes/fromefmplayer.js', __FILE__ ) ); wp_enqueue_script( 'fromefmplayer' ); } add_action('wp_enqueue_scripts', 'add_ffmjs'); //Add CSS files relating to plugin function add_styles() { wp_register_style( 'fromefmplayer', plugins_url( '/includes/fromefmplayer.css', __FILE__ ) ); wp_enqueue_style( 'fromefmplayer' ); } add_action('wp_enqueue_scripts', 'add_styles'); //Add shortcodes into wordpress function ffmplayer_func($atts) { //extracting the parameters and set defaults in case one isn't set by the user extract(shortcode_atts(array( 'show' => 'altfactor', 'showno' => '1000', ), $atts)); //now you have the variables $showname and $showno to play with //normal function code here include_once(ABSPATH . WPINC . '/rss.php'); $num_items = $showno; $feedurl = 'http://fromefm.co.uk/archive/dircasterX.php?show='.$show; $feed = fetch_rss($feedurl); $items = array_slice ($feed->items, 0, $num_items); $list = ""; foreach ($items as $item ) { $title = $item[title]; $mp3link = $item[link]; $description = $item[description]; $list .= "<li><a href='#' data-src='$mp3link'>$title - $description</a></li>";} return "<script> audiojs.events.ready(function() { var as = audiojs.createAll(); }); </script> <audio preload></audio> <ol> <li><a href='#' data-src='http://www.fromefm.co.uk/archive/sponsors/fromefm-luke.mp3'>FromeFM - Ident</a></li> $list </ol>"; //normal function code ends } function register_shortcodes() { add_shortcode('ffmplayer', 'ffmplayer_func'); } add_action('init', 'register_shortcodes'); ?>
  14. I basically need this code: <audio preload></audio> <ol> <li><a href='#' data-src='$mp3link'>$title - $description</a></li> <li><a href='#' data-src='$mp3link'>$title - $description</a></li> <li><a href='#' data-src='$mp3link'>$title - $description</a></li> </ol>
  15. Sorry im confused is that an answer to my last post or the one where I said it didnt work (as I typod a } symbol)?
  16. Last question for tonight as its late. How do I put some specific html before and after it. So it does this Blah blah blah [every entry in the rss] blah blah
  17. Echo kinda works, but then it displays at the top of the post. I'm told you need to use the return function. But that only shows 1. I'm a bit stuck.
  18. Right I've not managed to get the player working on a specific url but struggling with the rss reader part. I am using the built in Magpie RSS in Wordpress and have the following code include_once(ABSPATH . WPINC . '/rss.php'); $feedurl = 'http://services.runescape.com/m=news/latest_news.rss'; $feed = fetch_rss($feedurl); $items = array_slice ($feed->items, 0, 5); foreach ($items as $item ) { $title = $item[title]; $mp3link = $item[link]; $description = $item[description]; return "<li>$title - $description</li>"; } It only returns the latest one instead of the number I specified, 5. Any ideas?
  19. You should really search on how to add a specific file to the whitelist rather than bypassing the whole folder just in case something nasty finds its way there.
  20. No, but you can fletch in the mean time which makes it infinitely more worth doing. Unless you're already 99 fletching or even 99 magic. It's just incredibly slow and monotonous farming xp. Be better off putting weeds in all the farm plots around the world. That's more fun than livid farm.
  21. [hide]New question. My plugin is successfull including the javascript and css files for the player in the header of wordpress. My plugin is also successfully bringing accross my player.php script and generates the correct html as can be seeing by viewing the source of this page <audio src="http://www.fromefm.co.uk/archive/sponsors/fromefm-ident.mp3" preload="auto"></audio> However the audio.min.js doesn't convert that into the player as it should do. Any ideas? [/hide] Edit: Ignore. Forgot to add the following: <script> audiojs.events.ready(function() { var as = audiojs.createAll(); }); </script>
  22. Tried that. Again nothing happens. No errors but nothing showing in source code. Edit: Took out the 'return' statement before it and it now works. Thanks
  23. I've successfully got my plugin including all the relevant js and css files it needs and also got it reading the shortcode in the following format: [ffmplayer show=homelyremedies showno=5] which currently just outputs some text using those variables. See: http://frome.me/ffm/?page_id=48 <?php /* Plugin Name: FromeFM Player Plugin Version: 0.1 */ // Ads JS files relating to plugin function add_js() { wp_register_script( 'fromefmplayer', plugins_url( '/includes/fromefmplayer.js', __FILE__ ) ); wp_enqueue_script( 'fromefmplayer' ); wp_register_script( 'audiojs', plugins_url( '/audiojs/audiojs.min.js', __FILE__ ) ); wp_enqueue_script( 'audiojs' ); } add_action('wp_enqueue_scripts', 'add_js'); //Add CSS files relating to plugin function add_styles() { wp_register_style( 'fromefmplayer', plugins_url( '/includes/fromefmplayer.css', __FILE__ ) ); wp_enqueue_style( 'fromefmplayer' ); } add_action('wp_enqueue_scripts', 'add_styles'); //Add shortcodes into wordpress function ffmplayer_func($atts) { //extracting the parameters and set defaults in case one isn't set by the user extract(shortcode_atts(array( 'show' => 'altfactor', 'showno' => '1000', ), $atts)); //now you have the variables $showname and $shownumbers to play with //normal function code here return "You entered as the showname {$show} and put {$showno} as the number. "; //normal function code ends } function register_shortcodes() { add_shortcode('ffmplayer', 'ffmplayer_func'); } add_action('init', 'register_shortcodes'); ?> I've got a separate php file called hello.php which contains only some text saying "working" and I'm struggling to find a way of including it. I tried the following above where it says "normal function code ends" but nothing happens. Also tried echo and return, still nothing. include (plugins_url( './hello.php' , __FILE__ ));
  24. Thanks tripsis, I've done Wordpress plugins before but they have been very basic and I only made them to avoid editing functions.php directly. I'll have another got at this tomorrow, I've already spent about 5 hours on the player so far lol.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.