Yii eCommerce Changes

Yii eCommerce is going along nicely. Since i’ve used a premium theme for the Admin side of the application i can’t release this. I’ll be working on converting all the views to Bootstrap designing it myself and dropping the Admin theme currently installed. Any designers willing to help by contributing pages designed with bootstrap that fit the admin part of the application please let me know.

Here are some of the features being worked on:


  • Dropping Dulcet admin and using basic Bootstrap (To be able to release this to the public)

  • Using Twig as the template engine for both Admin & Front-End of the site to minimize risk and better readability

  • Using JS MVC framework for the Front-End of the website for better scalability, code management & speed (Probably going to use either AngularJS/Ember).

  • Design a basic Bootstrap theme for the Front-End.


Feel free to reach out if you are willing to help before this is released and posted on Github.

Thanks.

Share Comments

US Zip Codes List - Updated 42,000 Zip Codes

Updated list of US Zip Codes, State, City & County

This list contains nearly 42,000 Zip Codes from 62 Different states (Including Puerto Rico, Guam, Virgin Islands, American Samoa, Marshall Islands, U.S Armed Forces)

There is one MYSQL dump file that contains a table ‘zip_code’ with 4 columns (zip_code, city, county, state)

AA
AE
AK
AL
AP
AR
AS
AZ
CA
CO
CT
DC
DE
FL
FM
GA
GU
HI
IA
ID
IL
IN
KS
KY
LA
MA
MD
ME
MH
MI
MN
MO
MP
MS
MT
NC
ND
NE
NH
NJ
NM
NV
NY
OH
OK
OR
PA
PR
PW
RI
SC
SD
TN
TX
UT
VA
VI
VT
WA
WI
WV
WY


View @ Github
Share Comments

US Adjacent States List

“Adjacent is an adjective meaning contiguous, adjoining or abutting. It is commonly used in scientific, specifically mathematical contexts.”

This Repository contains a CSV file, PHP Array file and a MYSQL Dump file for all the states that have at least one adjacent state.

This was created due to a recent need for this and since i wasn’t able to find a good resource i’ve decided to create it.

View @ Github

Share Comments

Pure Inspection - Home Inspection Cloud Management Tool

Pure Inspection Managment - Simple and Efficent cloud based Home Inspection Manager. With this tool you’ll be able to Generate, Process, Send, Receive, View, Download Reports from anywhere using any kind of Operating System, Browser and Mobile Device.

Want to be notified when the site launches and the magic happens?
Enter your email address in the form above and we promise you’ll be the first to know when we open our doors.

Visit PureInspection.com For more information.

Share Comments

Cars Makes & Models list - PHP Array, JSON String, DB Tables

JSON string, DB Dump, PHP Array of all cars makes and models

This list consists of 71 makes and over 1,300 different models.

Last Updated: 02/11/2012

You’ll find a file with a JSON string, PHP array and an SQL dump of two tables (make & model)

This will allow to pretty much use the data in the easiest way for you whether it’s using PHP, DB or JSON.

© Vincent Gabriel @ http://vadimg.com

Github Repository

Share Comments

Twitter Bootstrap Wizard Plugin

This twitter bootstrap plugin builds a wizard out of a formatted tabbable structure. It allows to build a wizard functionality using buttons to go through the different wizard steps and using events allows to hook into each step individually.

Visit Website & Demo

Fork It On Github

Share Comments

Yii Widget for the Aloha Editor


Yii-Aloha-Editor-Widget


Yii Widget for the Aloha Editor

Project Page
Examples
Documentation
Yii Widget On Github


Requirements



  • JQuery > 1.7.1

  • Browser:
    • Firefox 3+

    • Safari 4+

    • Chrome 4+

    • Opera 10+

    • IE 7+




Installation




  1. Download or Clone the files



  2. Extract into the widgets folder or extensions folder



Usage


Using with a model

[php]
$this->widget(‘application.widgets.alohaeditor.AlohaEditor’, array( ‘model’ =>
$model, ‘attribute’ =>
‘some_attribute’, ‘showTextarea’ =>
true ));
[/php]




  • By default ‘showTextarea’ is set to false



Using selector to set multiple elements editable

[php]
$this->widget(‘application.widgets.alohaeditor.AlohaEditor’, array( ‘selector’ =>
‘.editable’ ));
[/php]


Using with a model and a basic toolbar

[php]
$this->widget(‘application.widgets.alohaeditor.AlohaEditor’, array(‘toolbar’ =>
‘basic’, ‘model’ =>
$model, ‘attribute’ =>
‘some_attribute’ ));
[/php]




  • There are two toolbars supported right now: basic and advanced



  • At any point you can add more plugins to the toolbar by assigned array elements to the plugins property in the widget



Using with a model and a basic toolbar and custom plugins

[php]
$this->
widget(‘application.widgets.alohaeditor.AlohaEditor’, array(‘toolbar’ =>
‘basic’, ‘plugins’ =>
array(‘extra/hints’), ‘model’ =>
$model, ‘attribute’ =>
‘some_attribute’ ));
[/php]


Using with a model and a basic toolbar and custom editor settings

[php]
$this->widget(‘application.widgets.alohaeditor.AlohaEditor’, array(‘alohaSettings’ =>
array(‘lang’ =>
‘fr’), ‘model’ =>
$model, ‘attribute’ =>
‘some_attribute’ ));
[/php]




  • Supported languages currently: de, en, fr, lv, pl, pt_br, ru, ua



  • Refer to the documentation for a list of supported params for the settings array



Using with a name and value

[php]
$this->widget(‘application.widgets.alohaeditor.AlohaEditor’, array( ‘name’ =>
‘some name’, ‘value’ =>
‘some value’ ));
[/php]


Authors


Vincent Gabriel http://vadimg.com

Share Comments

Rain TPL Yii View Renderer

Rain TPL Yii View Renderer

The easy and fast template engine for PHP. Rain.TPL makes application easier to create & enables designers/developers to work better together.

Project Page

Download

Documentation

Speed Test

Github Project Page

Yii Extension Github Project Page

Requirements

  • PHP 5
  • Yii 1.1.10 (Tested on 1.1.10 but should work on older versions as well)

Installation

  1. Download or Clone the files
  2. Extract into the extensions folder
  3. Edit the application config file and add the following array under the ‘components’ array:

[php]
‘viewRenderer’=>array(
‘class’=>’application.extensions.RainTPLViewRenderer’,
),
[/php]

Configure

The available options you can set for this view renderer are:

[php]
‘viewRenderer’=>array(
‘class’=>’application.extensions.RainTPLViewRenderer’,
// File extension used for views
‘fileExtension’ => ‘.tpl’,
// is the template directory
‘tpl_dir’ => null,
// where it save compiled templates and cache
‘cache_dir’ => null,
// the absolute base url of your application (eg. http://www.raintpl.com)
‘base_url’ => null,
// enable/disable the path replace
‘path_replace’ => false,
// configure what to replace
‘path_replace_list’ => array(),
// configure what command are not allowed
‘black_list’ => array(),
// enable/disable the control if template was modified by the last compiling
‘check_template_update’ => true,
// enable/disable the use of php tags in your template
‘php_enabled’ => false,
// Use the latest beta version for rain tpl 3
‘useRainBeta’ => false,
// Will not cache templates
‘debug’ => false,
// Auto escape variables
‘auto_escape’ => false,
),
[/php]

Usage

To render a view you would call the render method the same way

[php]
$this->render(‘someview’, $params);
[/php]

Template Syntax Examples


































































PHP Rain TPL
<?php echo $var; ?> {$var}
<?php echo CONSTANT; ?>
<?php $num + 10; ?> {$num + 10}
<?php echo $website[‘name’]; ?> {$website.name}
<?php echo $GLOBALS[‘name’]; ?> {$GLOBALS.name}
<?php if($year > 18) {echo ‘major’;}?> {if=”$year > 18”}major{/if}
<?php if($year > 18) {echo ‘major’;} else {echo ‘not major’;}?> {if=”$year > 18”}major{else}not major{/if}
<?php if() {echo ‘Hello’ . $name} else{ echo ‘Not Logged’; } ?> {if=”isLogged()”}Hello {$name}{else}Not Logged{/if}
<?php echo $is_logged ? ‘Hellow’ . $name : ‘Not logged’; ?> {$is_logged? ‘Hello $name’:’Not logged’}
<?php foreach($user_list as $key => $value) {echo $key . ‘-‘ . $value[‘name’] . ‘
‘}?>
{loop=”user_list”}
{$key} - {$value.name}

{/loop}
<?php include ‘footer’; ?> {include=”footer”}
<?php echo cut_html($news, 0, 12); ?> {$news|cut_html:0,12}
<?php pagination( $selected_page, NEWS_PER_PAGE, URL ); ?> {function=”pagination( $selected_page, NEWS_PER_PAGE, URL )”}
<?php echo substr($string,0,5); ?> {function=”substr($string,0,5)”}
<?php / comment / ?> { comment }

For more info see Documentation

Authors

Vincent Gabriel http://vadimg.com

Share Comments

PHP US States Array Grouped By Region

I needed a PHP array of the US states grouped by region, Since i did not find something like that i just made one real quick and thought i should share it in case someone else will need to do the same.

 

[php]
/**

  • Return list of states grouped by region
  • @return array
    */
    function getStatesByRegion() {
    return array(
    'Eastern' => array(
        'CT' => 'Connecticut',
        'DE' => 'Delaware',
        'DC' => 'District Of Columbia',
        'FL' => 'Florida',
        'GA' => 'Georgia',
        'IN' => 'Indiana',
        'KY' => 'Kentucky',
        'ME' => 'Maine',
        'MD' => 'Maryland',
        'MA' => 'Massachusetts',
        'MI' => 'Michigan',
        'NH' => 'New Hampshire',
        'NJ' => 'New Jersey',
        'NY' => 'New York',
        'NC' => 'North Carolina',
        'OH' => 'Ohio',
        'PA' => 'Pennsylvania',
        'RI' => 'Rhode Island',
        'SC' => 'South Carolina',
        'VT' => 'Vermont',
        'VA' => 'Virginia',
        'WV' => 'West Virginia',
    ),
    'Central' => array(
        'AL' => 'Alabama',
        'AR' => 'Arkansas',
        'IL' => 'Illinois',
        'IA' => 'Iowa',
        'KS' => 'Kansas',
        'LA' => 'Louisiana',
        'MN' => 'Minnesota',
        'MS' => 'Mississippi',
        'MO' => 'Missouri',
        'NE' => 'Nebraska',
        'ND' => 'North Dakota',
        'OK' => 'Oklahoma',
        'SD' => 'South Dakota',
        'TN' => 'Tennessee',
        'TX' => 'Texas',
        'WI' => 'Wisconsin',
    ),
    'Mountain' => array(
        'AZ' => 'Arizona',
        'CO' => 'Colorado',
        'ID' => 'Idaho',
        'MT' => 'Montana',
        'NM' => 'New Mexico',
        'UT' => 'Utah',
        'WY' => 'Wyoming'
    ),
    'Pacific' => array(
        'CA' => 'California',
        'NV' => 'Nevada',
        'OR' => 'Oregon',
        'WA' => 'Washington',
    ),
    'Other' => array(
        'AK' => 'Alaska',
        'HI' => 'Hawaii',
    ),
    
    );
    }
    [/php]
Share Comments

Yii E-Commerce Platform – Language Manager

Latest feature in the Yii E-Commerce platform is the Language Manager. This language manager is similar to the one i’ve used in Yii Framework CMS, With a few new features. With the current language manger you can:


  • Create/Update/Delete Languages from the control panel

  • Translate strings for each language separately

  • Sync between source language and destination language

  • Sync all languages

  • View only strings requiring translation in a language

  • Search for strings in a language

  • Set language to be public or private

  • See how many strings were translated versus number of total strings available

  • Export language as an xml file

  • Import language from a previously exported record - you can either update existing ones or skip them when importing. Import will create language if it’s not present.


See screenshot to get an idea of how this works.

[gallery link=”file” columns=”4”]

Share Comments