Shawn C and Friends

Where great minds make great things! Straight Koding Shiz Daily!

Extending Bonfires User System or EAV Users and PHP Development

| Comments

Bonfire’s base user system is based on a Entity-Attribute-Value based system where you store the user’s meta in a seperate table, very similar to how wordpress is setup.

This has a lot of benefits but can also cause a lot of confusion when it comes down to extending the user system, as with extending anything you want the end product to be maintainable but still be powerful and do everything you needed.

Bonfire’s default user system is setup with a main user table and a meta table, kinda something like this

User Table

----------------------------------
| UserID | Name   | Email | Pass |
----------------------------------
|   1    | shawnc | email | pass |
----------------------------------

Meta Table

----------------------------------
|  UserID  |   Key      | Value  |
----------------------------------
|  1       | first_name | shawn  |
|  1       | last_name  | c      |
----------------------------------

So basically the meta values are stored in a seperate table and added to the current_user object as needed with $this->user_model->load_meta, this does a good job for most systems I’ develop but every so often a piece of the user data that isn’t important enough to alter the entire system but I needed to be able to display this data like it was in the same table, so instead of 2 tables it would look like

Joined table result

-----------------------------------------------------------
| UserID | Name   | Email | Pass | first_name | last_name |
-----------------------------------------------------------
|   1    | shawnc | email | pass |    shawn   |    c      |
-----------------------------------------------------------

To generate the joined table as above I personally found joining the tables worked very well and did not cause to much server load, any suggestions will be taken if you have a different method but anyway to join the tables what I personally did was add a new method to the user model something like this.

user_model.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
  /**
   * Loads user and meta data in one query.
   *
   * @param  int  $user_id      user_id or blank for all.
   * @param  bool $show_deleted [show deleted users]
   *
   * @return mixed
   */
  function load_user_meta($user_id = 0, $show_deleted == FALSE)
  {

      $this->db->select('users.*, roles.role_name');

      $this->db->select('m1.meta_value AS first_name');

      // Just keep adding these and alias as you need!
      $this->db->select('m2.meta_value AS last_name');

      //
      $this->db->select('m2.meta_value AS alias');


      $this->db->join('user_meta', 'user_meta.user_id = users.id', 'left');

      // Here is the magic baby!
      $this->db->join('user_meta as m1', "m1.user_id = users.id AND m1.meta_key = 'first_name' ", 'left');


      $this->db->join('user_meta as m2', "m2.user_id = users.id AND m2.meta_key = 'last_name' ", 'left');

      // ! Change me
      $this->db->join('user_meta as m2', "m2.user_id = users.id AND m2.meta_key = 'alias' ", 'left');

      if ($show_deleted === FALSE)
      {
          $this->db->where('users.deleted', 0);
      }

      $this->db->where('users.banned =', 0);
      $this->db->group_by('users.id');

      if (is_numeric($user_id) && $user_id > 0)
      {
          return parent::find($user_id);
      }

      return parent::find_all();
  }

As always I take no responsibility for any typos misspelling, cats that commited suicide or anything else that hurt your eyes or sanitiy but that should get you started I hope,

picture of Shawn Crigger

About Shawn Crigger

Free lance web developer who lives for programming and debugging server and code when not Geeking out on creating new web applications, servers, home media theaters, or whatever else comes to me, you might find him Surfing the waves in Myrtle Beach SC. Current daily skill set involves PHP, JavaScript, CodeIgniter, and CI Bonfire!

Git Goodies for a Faster Git Workflow

| Comments

As I’ve grown to love GIT and decided that life is much better with it, and life would be a whole lot better if you could manage yours using GIT (I donnu git clone me or git fork me lol) anyway over the few years I have been using GIT now, I’ve found and collected a bunch of various helpers that improve my daily work flow with it.

Since I suffer from Short term memory loss apparently and I also like to share what I find useful to me , I’ve decided maybe some of my readers might find a few of these tools helpful to you, I normally use Debian or Mac for a OS so I’m not sure if much of this will be useful to my windows readers, but for us Command Line Junkies then a lot of this will be very helpful, There’s some aliases, some config changes, and then there’s the real hard-core packages and gem’s that I just can’t live without anymore.

O, if you haven’t watched Tech Talk: Linus Torvalds on git then I highly suggest it.

Aliases and my Global Config file Template.

I lost most of my aliases in my last hard-drive crash, so I have to rebuild them! I will add my aliases file from my office CPU when I go into the office though.

List of boss GIT helpers.

Git-extras

  • Adds a lot of useful, and handy commands for managing your git repos.
  • Mostly Bash Scripts so will work anywhere Bash is included and that should be anywhere you’re going to develop at.
  • Watch the video if you want to see some of the commands, or just head over to the repo and read the list of commands and what they do.

Random Git Scripts

This is just a collection of Random Git Bash and Ruby Scripts, that I found useful.

Git-flow

This is probably one of the best branching model’s I’ve used, it did have a little bit of a learning curve, so I’ll give you some links that I read to help me understand it better.

You should probably also go ahead and get the Bash Git-flow Completionn files also.

There’s also a Github flow that was recently released highly suggested if you havent already started with gitflow.

There’s also some screen-cast’s that might help for the visual learners.

Github-GEM

  • Official Github API Gem for working with Github repos

Gist-GEM

  • Makes managing of Gists through the command line easy, create them, delete them, etc.
picture of Shawn Crigger

About Shawn Crigger

Free lance web developer who lives for programming and debugging server and code when not Geeking out on creating new web applications, servers, home media theaters, or whatever else comes to me, you might find him Surfing the waves in Myrtle Beach SC. Current daily skill set involves PHP, JavaScript, CodeIgniter, and CI Bonfire!

Sublime Text Editor Snippets for Bonfire Released

| Comments

For those that use Bonfire and Sublime Text Editor, I have released my collection Snippet’s collection of just Bonfire snippets. Since there is already a CodeIgniter Snippet package out there, I’m only including Bonfire specfic snippet’s in the Package.

Currently you have to install the packages manually with git

Installation Instructions

Mac Installation Commands
1
git clone git@github.com:svizion/bonfire-snippets.git ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/bonfire-snippets
Linux Installation Command
1
git clone git@github.com:svizion/bonfire-snippets.git ~/.config/sublime-text-2/Packages/bonfire-snippets

Current Snippets

These are the current snippets I’ve included, ordered in some fashion that sorta mad sense.

Update : I just included all my Model Snippets and my Debugging Snippets related to Bonfire.

Template and Assets

Tab TriggerOutput
set_data Template::set();
render Template::render();
toolbar_title Template::set(‘toolbar_title’, ”);
clear_cache Assets::clear_cache();
add_js Assets::add_js();
add_css Assets::add_css();
add_mod_js Assets::add_module_js();
add_mod_css Assets::add_module_css();

Various Randoms

Tab TriggerOutput
cur_user $this->current_user->?;
bf_model Generates Bonfire Model Skeleton Structure
auth_controller Generates Authenticated_Controller Skeleton Structure
haz_perm PHP If Wrapper for has_permission check
restrict $this->auth->restrict();
log_activity $this->activity_model->log_activity($this->current_user->user_id(), ”, ‘module’);
settings_set $this->settings_lib->set();
settings_delete $this->settings_lib->delete();

Bonfire Module Snippets

Tab TriggerOutput
find $records = $this->$1_model->find($2);
find_by $records = $this->$1_model->find_by(‘$1’, ‘$2’);
find_all_by $records = $this->$1_model->find_all_by(‘$1’, ‘$2’);
insert $id = $this->$1_model->insert($2);
update $result = $this->$1_model->update($2, $data);
update_where $result = $this->$1_model->update_where(‘$2’, ‘$3’, ${4:$data});
delete $result = $this->$1_model->delete($2);
delete_where $result = $this->$1_model->delete_where(‘$2’, ‘$3’);
count_by $num = $this->$1_model->count_by(‘$2’, ‘$3’);

Debugging snippets I use some are not fully Bonfire related.

Tab TriggerOutput
cplog ChromePhp::log($1);
cperror ChromePhp::error($1);
console Console::log($1);
enable_profiler $this->output->enable_profiler(FALSE);
bflog parent::logit($1, ‘${2:error]’);
log logit($1, ‘${2:error]’);
dad $dump()die;

If you have any snippet’s you use for Bonfire please fork and add them.

picture of Shawn Crigger

About Shawn Crigger

Free lance web developer who lives for programming and debugging server and code when not Geeking out on creating new web applications, servers, home media theaters, or whatever else comes to me, you might find him Surfing the waves in Myrtle Beach SC. Current daily skill set involves PHP, JavaScript, CodeIgniter, and CI Bonfire!

Over-riding CodeIgniter Bonfire Core Modules and Making It Easy to Update Later

| Comments

One thing that I require a lot in building Bonfire based Websites is to modify mostly views in some of the Core Modules, namely the User Module since that has Public facing View files and not all my Websites are built using Twitter Bootstrap’s framework depending on the Front-end Developer I’m working with on the project with.

This is a really simple trick I learned not to long ago but makes upgrading very easy later on which with a constantly changing software like Bonfire then Over-riding my Core modules and keeping track of the changes gets hard namely when you build as many website’s as I do in a year. This is a very very very simple trick and you’ll probably have a Facepalm Moment for not thinking of this yourself after seeing what it involves!

Basically modules in Bonfire exist in 2 locations

  • bonfire/application/core_modules
  • bonfire/modules

Which the Core Bonfire related modules live in core_modules and custom modules belong in the modules directory. So the simple trick here is just copy your core_module into the modules directory like this.

cp -rfv /bonfire/application/core_modules/users /bonfire/modules

Or you can drag and drop it using Finder or whatever you do to copy a folder to a new location. So now yoo have 2 copys of the same module, you can actually delete the one your over-riding but I perfer to just leave it there myself.

So what have we learned here, the order modules are loaded is first “core_modules”, then “modules” so anything in the modules directory will over-ride the “core_modules” directory. Simple enough?

Hope this helps someone. Enjoy and Cheers!

picture of Shawn Crigger

About Shawn Crigger

Free lance web developer who lives for programming and debugging server and code when not Geeking out on creating new web applications, servers, home media theaters, or whatever else comes to me, you might find him Surfing the waves in Myrtle Beach SC. Current daily skill set involves PHP, JavaScript, CodeIgniter, and CI Bonfire!

Moving Blog Back to Shawn C

| Comments

Well Ready or Not Here We Are! Incase you noticed it, yes we have moved Domains back to ShawnC dot ORG! for a little history lesson, in around 2006 I started this blog on shawnc.org’s domain mostly to blog about linux then web development, the reason I bought the .org domain instead of a .com was someone already owned it go figure, well around 2008 or so if memory serves me the domain at .com was owned by another Web Programming Free Lancer, and not only that he lived about a hour from me so confusion was certain, I moved away from the name mostly due to that. Apparently since then he ripped off abunch of clients and vanished, off course the domain name is still for sale, some recently tried to sell it to me for 3k USD which seemed abit high for a domain I make no money off of.

Anyway this time around, I got sick of WordPress again or the server load that a PHP script or any dynamically generated content produces, so I’ve moved to a Static Content Generator called Ocotopress which is a Ruby based script that I’m having quite a lot of fun modifyin to my needs.

Now I know there are still some bugs left in the website and probably some broken links from the migration, sorry but if you find them it’d be mighty white of you to let me know about them would ya! You’d even get the Chuck Norris badge of well anyway if you see something broke then tell me will you, there’s comments and twitter’s and all kind of communication forms, use one!

And since we’re off to a new start, I’m gonna try and see if some of my friend (yes I do have them honestly really yep) will make some guest posts, might include some new topics, and last but not least Mor Cowbells my friends, yes Mor Cowbells!

picture of Shawn Crigger

About Shawn Crigger

Free lance web developer who lives for programming and debugging server and code when not Geeking out on creating new web applications, servers, home media theaters, or whatever else comes to me, you might find him Surfing the waves in Myrtle Beach SC. Current daily skill set involves PHP, JavaScript, CodeIgniter, and CI Bonfire!

Adding ChromePhp to CodeIgniter Bonfires Log Methods

| Comments

Earlier this year a extension and PHP class were released that allowed logging PHP messages to Chrome’s Console, similar to FirePHP for FireBug but well for Google’s Chrome Browser instead yay!. Anyway I’ve grown quite fond of both Chrome and the Console logging of my debug messages recently and decided maybe some of the other Bonfire users might find some use in this.

Basically Bonfire has 2 helper methods called logit one as a application helper and one in the model, these handy helper’s make a log entry in CodeIgniter’s system log, and use the Console class already included in Bonfire to output any message. The only problem with this is normally when you have a error the page doesn’t finish rendering and the stock Bonfire Console library doesn’t display any data since it’s not rendered. So I just made a few quick changes to the logit methods and added the helper. And now I have better debugging ability!

First get the helper and the extension, my friend Marco Monterio has already explained on his blog how to install the extension and the helper, so check his blog out on installing the ChromePhp library to CodeIgniter. Once you have it installed, then you can make these changes and you’ll be debugging like a kingpin while your off getting your ChromePhp on, I’ll gonna drink that beer you bought me :beer:

Ok, so we only need additions to 2 files and 2 methods, this is easy! Let’s start with MY_Model. So open up “/bonfire/application/core/MY_Model.php”, do a quick search for “logit” and add the code I have below for ChromePhp

MY_Model.php logit method
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
  /**
  * Logs an error to the Console (if loaded) and to the log files.
  *
  * @param string $message The string to write to the logs.
  * @param string $level   The log level, as per CI log_message method.
  *
  * @access protected
  *
  * @return mixed
  */
  protected function logit($message='', $level='debug')
  {
      if (empty($message))
      {
          return FALSE;
      }

      if (class_exists('Console'))
      {
          Console::log($message);
      }

      // Just add from here
      if (class_exists('ChromePhp'))
      {
          if ($level == 'error')
          {
              ChromePhp::error($message);
          }                
          else
          {
              ChromePhp::log($message);
          }                
      }
      // Just to here.

      log_message($level, $message);

  }//end logit()

  //--------------------------------------------------------------------
?>

Ok so there’s the Model changes, now open up “bonfire/application/helpers/application_helper.php” and once again find the “logit” function

application_helper.php logit function
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
  /**
  * Logs an error to the Console (if loaded) and to the log files.
  *
  * @param $message string The string to write to the logs.
  * @param $level string The log level, as per CI log_message method.
  *
  * @return void
  */
  function logit($message='', $level='debug')
  {
      if (empty($message))
      {
          return;
      }

      if (class_exists('Console'))
      {
          Console::log($message);
      }

      if (class_exists('ChromePhp'))
      {
          if ($level == 'error')
          {
              ChromePhp::error($message);
          }                
          else
          {
              ChromePhp::log($message);
          }                
      }

      log_message($level, $message);
  }

  //--------------------------------------------------------------------
?>

And there ya go, now everytime logit is called, you can see what the message was inside of your Chrome Web Inspector Console just like you would a JavaScript console.log method would give. Amazing stuff!

Cheers and Free beers again!

picture of Shawn Crigger

About Shawn Crigger

Free lance web developer who lives for programming and debugging server and code when not Geeking out on creating new web applications, servers, home media theaters, or whatever else comes to me, you might find him Surfing the waves in Myrtle Beach SC. Current daily skill set involves PHP, JavaScript, CodeIgniter, and CI Bonfire!

Using Bonfire Without Bootstrap in Frontend

| Comments

Something I’ve noticed in recent days is using Bonfire without Bootstrap in the front end, for the most part it works fine with just changes to the User Module view files, but one thing that will cause issues is the Form helper since it has been converted to use Bootstrap.

It’s a easy fix thou, imagine that! Since the Form helper is a Helper and a Library you just need to rename to files and then in the Admin Base Controller (MY_Controller.php) load those files so that any Admin modules will still work properly.

So rename the following to bootstrap-form_helper.php and bootstrap-form.php

bonfire/application/helpers/MY_form_helper.php
bonfire/application/libraries/form.php

Once those are renamed, open up MY_Controller, find the Admin_Controller and load the helper.

$this->load->helper('bootstrap-form');

And that is all. Over and Out!

picture of Shawn Crigger

About Shawn Crigger

Free lance web developer who lives for programming and debugging server and code when not Geeking out on creating new web applications, servers, home media theaters, or whatever else comes to me, you might find him Surfing the waves in Myrtle Beach SC. Current daily skill set involves PHP, JavaScript, CodeIgniter, and CI Bonfire!

Setting Up Linuxmint Debian for Web Development

| Comments

Debian Tricks and Tips

Like most of you, I’ve given up on Ubuntu it had a great run but it’s all over baby-blue, it’s turned into a Mac wanna be. Granted yes it’s super easy to learn, and I highly suggest it to Winblows users as a easy linux start.

But coming from the days of Fiesty and before, I don’t like Unity bla and some of the other junk out there. So I’ve moved back to Debian and kind of forgot a lot of Debian since I’ve been so used to Ubuntu.

The First thing I needed as a PHP development envirment on the ASAP, so that’s a LAMP stack, we already have the L so we just need the AMP! for those not in the know, LAMP stands for Linux, Apache, MySql and PHP, all of which are easy to install in Synaptics.

Now one thing I’ve grown pretty used to was PPA packages. So let’s get them started and hopefully some Ubuntu packages can be installed easily.

Debian is different then Ubuntu in that you need the old school keys for packages, what security in place? OMG! No this is easy stuff on the Terminal and if you don’t wanna be in the Terminal, get a Mac or Ubuntu.

I like the launchpad PPA’s namely for Sublime and some other goodie’s, so without drum roles, 21 gun sallutes ( yea I know I cant spell, I’m sure you know what I’m saying or get me a Gizoo to fix these things! Google it hint Flintstones)

Run these in bash (commands.sh)
1
   sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys XXXXXXX

Let’s break that down, for once I’m gonna explaign! Apt is short for aptitude yep remember that? Now, the XXXXXX thing, that’s your key. When you goto your Launchpad PPA, there’s a key kinda looks like 1024 / XXXXXXX, take the / XXXXX and put it there.

After that, let’s add our sources, update and get jiggy wit it.

Run these in bash (commands.sh)
1
   sudo /etc/apt/sources.list.d/something.list

In there just grab the “deb *****” junk, ( yes I will show a install soon ) drop them in and run

Run these in bash (commands.sh)
1
   sudo apt-get update

That updates are apt sources, then install something. Now since I’m setting up a Dev env, I want Sublime text editor to start. Which looks like this.

Run these in bash (commands.sh)
1
2
3
   sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
  sudo update
  sudo apt install sublime-text

And yes I did forget to give you the PPA but it changes, I got mine from WebUpd8

And they have some great information and other goodies on there website. Google it

Another Editor I like to use is Geany

You can install it from Synaptic’s which makes it easier, just search for geany and grab whatever you need.

I also like to add the solorized color schemes, you can get them for github

Just clone it, copy the colorschemes and filedefs folders to

~/.config/geany/geany-themes/

PHP Install tricks and tips

PHP was easy to install on Debian, some of the modules weren’t included in the base so lets add Curl, Mcrypt, etc

Just drop this in terminal

Run these in bash (commands.sh)
1
   sudo apt-get install curl libcurl3 libcurl3-dev php5-curl php5-mcrypt phpmyadmin

Once I got PHP installed I needed PHPDocumentor, and CodeSniffer so let’s go get that stuff.

Install PHPDocumentor & CodeSniffer (install_pear_packages.sh)
1
2
3
4
5
pear channel-discover pear.phpdoc.org
pear install phpdoc/phpDocumentor
pear install phpdoc/phpDocumentor_Template_responsive

pear install PHP_CodeSniffer

Another thing I needed was Mod Rewrite enabled ib Apache so just enable it.

Run these in bash (commands.sh)
1
   sudo a2enmod rewrite

One more thing I always need is Virtual Hosts since the days of FTPing are almost over, I work local then gitpush it the servers mostly cloud based nowadays so, lets go through and make one easy like. This assumes you’ve done this before.

First copy the example

Run these in bash (commands.sh)
1
   sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/new

Go inside there change what you need, make sure Allowoverride is set to All, and then enable it

Run these in bash (commands.sh)
1
2
   sudo a2ensite new
  sudo service apache2 restart

And that’s a virtual host.

NodeJS and Ruby like the Hipsters Do!

Ok ok, what Dev envirment would I be creating with out NodeJS and Ruby, I know so let’s get started shall we, hopefully you won’t be growing a beard and calling everyone Braj after this……Right on Braj :P

One again pop open the terminal, which you should be living in anyway. And let’s toss some commands out there.

Step one, install the build essentals which you should already have.

Run these in bash (commands.sh)
1
sudo apt-get update && apt-get install git-core curl build-essential openssl libssl-dev

After that, let’s clone Node and compile from source cuz we cool like that right Braj?

Run these in bash (commands.sh)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
git clone https://github.com/joyent/node.git
cd node

# 'git tag' shows all available versions: select the latest stable.
git checkout v0.6.8

# Configure seems not to find libssl by default so we give it an explicit pointer.
# Optionally: you can isolate node by adding --prefix=/opt/node
./configure --openssl-libpath=/usr/lib/ssl
make
make test
sudo make install
node -v # it's alive!

# Lucky us: NPM is packaged with Node.js source so this is now installed too
# curl http://npmjs.org/install.sh | sudo sh
npm -v # it's alive!

Now that we have NodeJS going, lets drop in what I use alot

Run these in bash (commands.sh)
1
npm install recess -g

Ok that’s Node, Ruby is even easier here.

First thing’s first, we need to install abunch of build-dependicy’s for Rails, otherwise you’ll get errors eventually.

Run these in bash (commands.sh)
1
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion
Run these in bash (commands.sh)
1
2
3
4
5
6
bash < <(curl http://rvm.beginrescueend.com/releases/rvm-install-latest)
apt-get install ruby rubygems libzlib-ruby rdoc irb
gem install rubygems-update
/var/lib/gems/1.8/bin/update_rubygems
gem install rvm
/var/lib/gems/1.8/bin/rvm-install

Now we need to adjust the .bashrc and or .zshrc if using it

Add to the bottom of ~/.bashrc (bashrc.sh)
1
2
3
   if [[ -s /home/<username>/.rvm/scripts/rvm ]]; then
    source /home/<username>/.rvm/scripts/rvm
  fi

I had to install this too

Run these in bash (commands.sh)
1
   apt-get install file

Change to whatever version of ruby u want to use you can install more then one

Run these in bash (commands.sh)
1
   rvm install 1.x.x

If you have any errors try checking the requirements for rvm

rvm requirements

Once Rails and RVM are setup let’s get the Gems I like.

Run these in bash (commands.sh)
1
2
3
4
5
gem install compass
gem install sass
gem install bundler
gem install css2less
gem install less

Ok that’s the start of my Debian install. Stay Tuned for more Adventures in Linux land!

picture of Shawn Crigger

About Shawn Crigger

Free lance web developer who lives for programming and debugging server and code when not Geeking out on creating new web applications, servers, home media theaters, or whatever else comes to me, you might find him Surfing the waves in Myrtle Beach SC. Current daily skill set involves PHP, JavaScript, CodeIgniter, and CI Bonfire!

Using Flickr Api Explorer to Fetch All Your Photo Ids and Names

| Comments

So the switch from clunky old wordpress is moving right along now and bam, I hit a snag. I decided to host all my photos on FlickR since they offer a decent photo service and there’s plenty of easy to use gems so hey why not right?

Well since I exported about 70% of my posts from Wordpress to Markdown and about 65% of those came out fairly decent, but all my images were now stuck FlickR in weird numbers and I just wanted to say flickr phto but that would way to easy right? NAH! Let’s do this smart way please, I know u can find batch uploader and badbam there up there, just stick them all in a photoset and let’s use FlickR’s own API for our own greedy time saving reasons.

I remember awhile ago I wrote a acouple gallerys based on FlickR and they had a great API and a API Explorer/Tester whatever the we want is flickr.photosets.getPhotos

This will give you all your photo ids and names and all kinda goodies that I didn’t need but, hey hey extra extra info never hurt no one so lets what need.

O wow, just stick photoset ID inside the box, I’d set the per to like 1000 so u get them and personally I’d just get a JSON output then from there it’s just finding the images and replacing them with the flickr tag .

picture of Shawn Crigger

About Shawn Crigger

Free lance web developer who lives for programming and debugging server and code when not Geeking out on creating new web applications, servers, home media theaters, or whatever else comes to me, you might find him Surfing the waves in Myrtle Beach SC. Current daily skill set involves PHP, JavaScript, CodeIgniter, and CI Bonfire!

Creating a Help Controller Bonfire Codeigniter

| Comments

In a recent application, I needed the ability to add Help context’s to allow the admin to see instructions in general and by mdule, so I added a simple help controller and default view.

It’s easy really, just add a controller in your applications/controllers/help.php

then add in your application/views/admin/help/index.php

And to-da there’s the code for all the magic to happen just git clone it and have a field day with the ak!

From there, you can now add help.php controllers in your modules!

Who-rah! Help is on the Way my friends!

picture of Shawn Crigger

About Shawn Crigger

Free lance web developer who lives for programming and debugging server and code when not Geeking out on creating new web applications, servers, home media theaters, or whatever else comes to me, you might find him Surfing the waves in Myrtle Beach SC. Current daily skill set involves PHP, JavaScript, CodeIgniter, and CI Bonfire!