Pace Solutions Blog

Web 2.0, e-Commerce, Joomla, WordPress, Facebook Applications, Drupal, Open Source, CMS, PHP, MySQL, AJAX

Archive for the ‘PHP’ Category

Pace Solutions launched a new portal “PHP Lahore”

Tuesday, November 3rd, 2009

PHP Lahore LogoPace Solutions is pleased to launch PHP Lahore our aim to focus our all Lahore developers and built stronger connections between of them.

PHP Lahore has been a strategic platform for PHP developer, sustaining and sharing knowledge about PHP for development on the global development agenda, in conjunction with our face to face events.

The introduction of the new PHP Lahore portal also encourages  the inclusion of more development beyond Pace solution network members, offering free subscription to an extended pace solution community which structure now includes pace solution partners, Advisors, and friend of pace solutions. This larger PHP Community is expected to facilitate richer networking among organizations and individuals who wish to learn about PHP.

Among other functions, the new PHP Lahore portal features open source menu, moderated visitor comment boards, the list of prevailing PHP thematic interests established by all developers, and new comers.
(more…)

Display view inside a view

Wednesday, July 8th, 2009

Drupal 6 replaces the views_build_view by views_embed_view, which make sense at least by the name of function.

$viewName = 'MYVIEWNAME';
print views_embed_view($viewName);

The views_embed_view has 2 default arguments. The second argument allows you to enter the display_id of the view (example: default, page, block, etc). Any additional argument you specify will be passed to the views argument handler. For instance, if you wanted to embed the block view and pass it a list of nodeIDs as an argument.

$viewName = 'MYVIEWNAME';
$display_id = 'block';
$myNodes = array(1, 2, 3);
print views_embed_view($viewName, $display_id, $myNodes);

Automatically provide TinyURL for your links

Friday, March 6th, 2009

Ever wonder how some sites provide tiny web addresses for your links. Its easy as like eating ice cream.

Create a global public function

function getTinyUrl($url) {
$tinyurl = file_get_contents("http://tinyurl.com/api-create.php?url=".$url);
return $tinyurl;
}

Usage example

$url = 'http://www.google.com/search?hl=en&q=pace+solutions&btnG=Search';
$turl = getTinyUrl(get_permalink($url));
echo 'TinyURL for link is: <a href="'.$turl.'">'.$turl.'</a>';

Output:
TinyURL for link is: http://tinyurl.com/atqflt

Copyright © 2009, Pace Solutions. All rights reserved.
Privacy Policy | Terms of Use | FAQ's | Feedback | Contact Us
www.arslanrauf.com