levelx.me

  • Home
  • Design
    • 3D
    • Art
    • Freebies
    • Inspiration
    • Interior Design
    • Photography
    • Tutorials
    • Typography
  • Technology
    • Benchmarks
    • How To
    • News
    • Programming
    • Reviews
    • SAP BASIS
  • Lifestyle
    • Do it Yourself
    • Entertainment
    • Quotes
    • Self Improvement
    • Sports
  • Resources
    • Infographics
    • Themes
    • Tools
    • Wallpapers
  • ETC
    • places
    • Uncategorized
  • Android
    • How To
    • News
  • Apple
    • How To
    • News
  • Archive for the ‘Programming’ Category:

    Hiding the Administrator or Front end layout template in Joomla!

    September 1st, 2009 / No Comments » / by Faizan

    It’s taken a good part of an hour trying to find how to disable the administrator or front end template for Joomla.
    So I thought I’d just make a post in an effort to turn this frustrated energy into something positive.

    To display only the contents of the view on the page without being framed by a template, the tmpl variable needs to be set to “component”.

    Something along the lines of having the following snippet in the controller method:
    JRequest::setVar(’tmpl’, ‘component’);

    Either that, or adding “&tmpl=component” to the URL.

    I remember doing it before, however it’s been a while.

    All attempts at searching on how to do the above proved frustratingly impossible as the organic search results for google are filled with people asking how to “disable legacy” modes, “templates”, “modules”, “plugins”, how to make your joomla admin panel rock(!!!!) – not what I was looking for!

    Hope this helps other Joomla! component developers :P

    reference

    Posted in Programming | No Comments »

    Symfony Admin Generator Calling Actions with Custom Parameters

    September 1st, 2009 / 8 Comments » / by Faizan

    The administration module actions can receive custom parameters using the query_string argument in a link_to() helper. For example, to extend the previous _edit_header partial with a link to the comments for the article, write this:

    It filters the comments to display only the ones related to $article. Using the query_string argument, you can specify a sorting order and/or a filter to display a custom list view. This can also be useful for custom interactions.

    Override index function

    public function executeIndex(sfWebRequest $request)
    {
    // For filter.. This code was missing in symfony documentation.
    if ($request->getParameter('filter'))
    {
    $this->setFilters($request->getParameter('project_filters'));
    }
    //-----------------
    // sorting
    if ($request->getParameter('sort'))
    {
    $this->setSort(array($request->getParameter('sort'), $request->getParameter('sort_type')));
    }
    // pager
    if ($request->getParameter('page'))
    {
    $this->setPage($request->getParameter('page'));
    }
    $this->pager = $this->getPager();
    $this->sort = $this->getSort();
    }
    

    Posted in Programming | 8 Comments »

    Fixing IE7 dropping PHP Sessions

    February 10th, 2009 / 25 Comments » / by Faizan

    After banging my head against the wall, and spending the better part of today trying to find out why my session variables were not being transferred from page to page in IE7, it worked fine in Firefox and Safari. The sessions not working were rendering MySpace OpenSocial App in Iframe and was dead to anyone using IE7. But the good news is i got it fixed (thanks to google), and the fix is so simple it’s ridiculous.  Before you start your session, you need to declare a privacy policy in your header.

    header('P3P: CP="CAO PSA OUR"');
    ob_start();
    session_start();

    Other things learned during MySpace development.

    • Everything works just fine in FireFox, IE7 is the only culprit :p
    • If you try to send any OpenSocial request through MySpace IFPC library in IE7 before the page is fully loaded, IE7 will give alert error saying Object Not Found. To fix this wait for page load and then make request.
    • request.AdjustHeight() will not work in IE7 if Symfony’s development (frontend controller) environment is enabled.
    • I’ve already forgot a lot of things that I learned, will try to remember them again and bookmark them.

    Posted in Programming, Technology | 25 Comments »

    12

    Subscribe to Levelx

    Popular Posts

    • Create a jigsaw puzzle in adobe illustrator
    • Nokia 5130 XpressMusic Unboxing & Review
    • Famous Salvador Dali Paintings
    • From Sand To Silicon: How A Intel CPU Is Built
    • I Am The Stig – Facebook Application
    • Typography Tips – With Amazing Examples
    • 3D Building Exterior Render – Design Workflow
    • Silent Hill 2: Revelation – Film Photos from Production Set
    • Upcoming Blockbuster Movies 2011: Trailers and Release Dates
    • Kaghan Valley – Pakistan

    Recent Comments

    • Loading...

    Top Posts

    • FORMULA 1 - 2009 Season. (28)
    • Fixing IE7 dropping PHP Sessions (25)
    • M2N32 SLI-DLX WFI && RzR DeathADDER - - BURNT ! ! (17)
    • Windows 7 Theme - VEER II (17)
    • HTC Desire - Benchmark (17)
    • The Temples of Katas Raj (17)
    • Home Decoration and Interior Design 2011 (17)
    • From Sand To Silicon: How A Intel CPU Is Built (16)
    • HTC Desire 2.10.405.2 OTA Update (16)
    • REQ: Stalker [ 1979 ] OST. (15)

    Tags

    1TB android android 2.3 gingerbread android software apple art asus benchmark desire desktop eclair facebook Formula 1 froyo Gaming gingerbread google hacking htc HTC Desire infographic internet ios iPad iphone Islam lahore Lifestyle mobile new year Nexus one Nokia nvidia pakistan photography php psp Review s60 smart phones symbian symfony typography wallpapers web 2.0

    levelx.me is proudly powered by WordPress | Theme Designed by AF8AB