Jump to content

Search the Community

Showing results for tags 'freeflyin'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Found 2 results

  1. [SIZE=6]FreeFlyin Framework[/SIZE] What is it? Freeflyin Framework is a PMV (page-module-view) system. I found models profusely useless, so I do not use them. Everything runs through the page your current on, so if you're on yourwebsite.com/index, it would load the defaultpage page. There is something called a [i]private registry[/i] and [i]public registry[/i]. Public registry can/should be used for importing css/js and for universal access to modules you wish to be static. The private registry is used for modules that are going to be dynamic. Anyways, in the page class, you can initialize widgets and import modules to assist you with the functionality of your website. It's very simple, and very easy to build upon. Unlike other frameworks, it takes a bit of head scratching to get anything solved. This is simple. Download, edit, upload, and done. The only thing you have to worry about is your .htaccess. [SIZE=6]Example Code[/SIZE] An example default page class: [PHP] <?php class DefaultPage extends Page { protected function beforeLoad() { $this->template['view'] = 'index'; $this->template['data'] = array(); $this->initWidget('contact', array('email' => '[email protected]')); } protected function onLoad() { $this->loadTemplate('default'); } } ?> [/PHP] Widget Example: (Twitter widget, with database caching) [php] <?php class TwitterWidget extends Widget { private $tweets = array(); protected function beforeLoad() { parent::beforeLoad(); $mysql = PublicRegistry::dispatch('MysqlStub'); $result = $mysql->fetchArray('SELECT * FROM tweets'); if((time() - $result[0]['time']) > $this->args['update_time']) { $this->updateTwitterFeed(); } else { foreach($result as $tweet) $this->tweets[] = $tweet['text']; } } public function onLoad() { $this->loadView('twitter', array('tweets' => $this->tweets, 'username' => $this->args['username'])); } private function updateTwitterFeed() { $ch = curl_init('http://twitter.com/statuses/user_timeline/'.$this->args['username'].'.json?count='.$this->args['count']); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $results = curl_exec($ch); curl_close($ch); $results = json_decode($results); foreach($results as $result) { $this->tweets[] = $result->text; } $mysql = PublicRegistry::dispatch('MysqlStub'); $result = $mysql->query('SELECT * FROM tweets'); $time = time(); $id = 0; if(mysql_num_rows($result) < $this->args['count']) { if(count($this->tweets) >= $this->args['count']) { mysql_free_result($result); foreach($this->tweets as $tweet) { $tweet = mysql_real_escape_string($tweet); $mysql->query("INSERT INTO tweets (text,time) VALUES ('$tweet', '$time')"); } } } else { mysql_free_result($result); foreach($this->tweets as $tweet) { $id++; $tweet = mysql_real_escape_string($tweet); $mysql->query("UPDATE tweets SET text='$tweet', time='$time' WHERE id='$id'"); } } } } ?> [/php] View example: (index view) [php] <div id="body"> <h1>Welcome FreeFlyin Framework user!</h1> <p>You made a great decision to come with us! Not only are we unique, but we're also speedy. No need to take an hour just to setup your framework! In fact, you should be able to set this up under 10 minutes (depending on your internet speed). Honestly, you probably could do it in one minute. After that, it takes about ~30 to 60 minutes implementing your template. In fact, you don't even have to deal with that! This framework is quite unique, and after deciding that templates can rather be more of a pain then beneficial. So, you'll load everything through your 'view' files. </p> <br /> <p> Honestly, that folder is going to get big. But no problem! You can use <code>$this->loadView('template' . DS . 'header');</code> verus <code>$this->loadView('header');</code> in order to keep your views organized. In fact, if you're that nit picky, you could even write your own loadView function in your own page class!</p> <br /> <p>Here is an example of using an image!</p> <img src="<?php echo MEDIA; ?>/images/smilely.png" alt="frowny.png" /> <p>Here is an example of another way to use an image while under this framework! </p> <?php echo $this->importImage('frowny.png', 'frowny :('); ?> </div> [/php] Will eventually release on github once it is finished.
  2. [url]http://freeflyin.com/index[/url] Features: *SEO friendly urls *Contact field with a max of 3 emails per hour *Awesomness??? *Cool graphics Tell me what ya think. I need to add a bit of SEO tags still yet. *Need to fix twitter issue, I guess I'm sending too many requests. **I guess I'm going to implement caching for the twitter widget. - done.