Recent comments

  • Drupal 7 vs Symfony 2: overview after 1 year of Symfony development   2 years 9 weeks ago

    "Symfony is more elegant and proper, but Drupal gets the job done." is best comment of all time. THX Larry Garfield.

  • Manage your Drupal website faster: best modules available   2 years 14 weeks ago

    Excellent perspective. I certainly like what you wrote and I have been contemplating the same thing. Slick site as well, did you design it yourself? Looks great. Could be a smithereen quicker though. I have been utilizing these gentlemen for years and they may be useful for you. Their content delivery service and cloudlinux has boosted the snappiness of my website quite a bit and I have no problem suggesting them.

  • Sending emails with attachments in Ubercart   2 years 15 weeks ago

    I unfortunately I could not get the code above to work (Drupal 6, Ubercart 6.x-2.8).

  • Drupal 7 vs Symfony 2: overview after 1 year of Symfony development   2 years 17 weeks ago

    Wonderful blog! I found it while surfing around on Yahoo News. Do you have any suggestions on how to get listed in Yahoo News? I've been trying for a while but I never seem to get there! Thanks gedaddgdkfec

  • Adding "Price" field to Ubercart cart page   2 years 19 weeks ago

    Hi what about this table uc_cart_review_table ?

  • Improving user experience: using Dialogs for profile edit in modal forms   2 years 20 weeks ago

    An interesting discussion is definitely worth comment. I believe that you need to write more on this subject,
    it may not be a taboo matter but usually folks don't speak
    about these topics. To the next! Many thanks!!

  • Manage your Drupal website faster: best modules available   2 years 20 weeks ago

    Hey there! Someone in my Facebook group shared this website with us so I came to
    give it a look. I'm definitely loving the information.
    I'm book-marking and will be tweeting this to my followers!

    Wonderful blog and superb design and style.

  • Drupal 7 vs Symfony 2: overview after 1 year of Symfony development   2 years 20 weeks ago

    Hi Alex!
    if you have to run cron every minute - you are probably doing something wrong :)
    Ultimate Cron is definitely better stuff than regular cron, though.
    But I think you may try to convert this code to queues and workers, you can do that both in Ruby and PHP world - https://github.com/resque/resque is a good example.

    Drupal and its node_load is still very expensive in terms of db and cpu. For good performance of authenticated users I definitely recommend to try some framework. We are currently doing several big projects on https://github.com/yiisoft/yii2 which is very fast and looks more like regular PHP - so for our team it is more fun to write code than in sf2 Java-style, but later code reading will not be that smooth I suspect :) the yii2 is not stable yet.

  • Drupal 7 vs Symfony 2: overview after 1 year of Symfony development   2 years 20 weeks ago

    That's a great post, thanks!
    Right now we have not small drupal 7 project, and I see some serious problems. Looks like impossible to grow. We're using mostly Ultimate Cron, Rules, Entity, Panels, Some modules build custom, and of course we're using views.

    For all website tasks we need cron, so..we chose to use Ultimate Cron module and some cron jobs runs every min. I know this is bad practice (very bad for performance), but to accomplish that we need to run cron every min. to check some entity tables..make inserts and updates.

    I can tell, we're stuck. Even if we're using Redis caching for auth. users. System slow... Ultimate Cron is killing system. GetPantheon is a great hosting and they give great tools (git, backup, redis, varnish) + great speed, but not for huge projects, my opinion, maybe I'm wrong.

    So..why I'm writing all that? I'm trying to reproduce my existing project on Symfony or RoR. Still not sure what to choose.
    If someone had tried to move logics and features from drupal in to some other framework, please tell if make sense.. which way is right to use, Symfony or RoR? I'm looking framework with good documentation and for long term to use.

    Thanks.

  • Using Ubercart to sell files: ui improvements and creating file feature programmatically   2 years 24 weeks ago

    I could not resist commenting. Perfectly written!

  • Improving user experience: using Dialogs for profile edit in modal forms   2 years 33 weeks ago

    First thing I get is:
    "undefined variable: ajax"

    Could you please explain?

  • Image title as text description for colorbox image formatter (Drupal 7)   2 years 35 weeks ago

    Sorry my html tags were removed, I changed all the < to { for the sake of my post:

    // ##### Here are the lines I've added
    $my_style = 'i600';
    $image_caption = 'Click to enlarge';
    if ($variables['image']['style_name'] == $my_style) {
    $image .= '{span class="img-title"}{i}' . check_plain($image_caption) . '{/i}{/span}';
    }
    // ##### end of modification

    As you can see I was able to use {i} but {small} does not work which lead me to wondering about the css class.

  • Image title as text description for colorbox image formatter (Drupal 7)   2 years 35 weeks ago

    Where do I find the css for class="img-title" so I can adjust the appearance of the caption? Here is what I have right now:


    // ##### Here are the lines I've added
    $my_style = 'i600';
    $image_caption = 'Click to enlarge';
    if ($variables['image']['style_name'] == $my_style) {
    $image .= '' . check_plain($image_caption) . '';
    }
    // ##### end of modification

    I was able to add but did nothing. I would also like to change the color but at this point I feel like I should be listing these changes in a css file since there is a class tag used here.

    Thanks for the code, this is a huge help.

  • Image title as text description for colorbox image formatter (Drupal 7)   2 years 35 weeks ago

    You must use one of the image styles from Config->Media->Image Styles, not one of the colorbox styles.

  • Writing robust code that uses fields, in Drupal 7   2 years 39 weeks ago

    I found that a check using 'empty()' was sufficient, except where accessing an entity reference field where I was looking for an nid or uid. For nid or uid, I'd use 'is_numeric()', otherwise I'd get the error you mention (ie 'parent data structure is not set...')

    Here's example code:

    $public_email = $wrapper->field_public_email_address->value();
    if(!empty($public_email)) { // only need to used 'empty()' here
    // $public email exists, so do something with it...
    }

    if(is_numeric($wrapper->field_director->uid)) { //is_numeric() needed to check entity ref. uid
    $director = $wrapper->field_director->uid->value();

    if(!empty($director)) {
    $tbl_project['project_director_user_code'] = $director;
    }
    }

  • Image title as text description for colorbox image formatter (Drupal 7)   2 years 39 weeks ago

    I was very happy to found your code. But it didn't works for me. Maybe I do something wrong.
    I put the code in my template.php and changed YOURTHEME in YOURTHEME_colorbox_imagefield($variables) with my themename. Then cleared the cache.
    I there anything else to adapt?

    I use the colorbox style "plain".

    smal-anda

  • Writing robust code that uses fields, in Drupal 7   2 years 43 weeks ago

    haven’t built any d7 Multilanguage yet hence I am not aware of the fact you had mentioned here but as you are a senior to this field you have a very good experience that supports my knowledge far better than what I know

  • Packt Publishing book - Premium Drupal themes   2 years 46 weeks ago

    Congratulations!! Hope you can accomplish your goal of becoming an authore real soon.

  • Drupal 7 vs Symfony 2: overview after 1 year of Symfony development   2 years 46 weeks ago

    Well, I think that the level of maturity of both systems (Drupal and Symfony) is good enough, and the length of development lifecycles of new major version is so big that most of websites can live happily for 3-4 years without upgrading to younger major version. I have few examples of big projects upgrading from Drupal 5.x to 6.x, and from Drupal 6.x to 7.x, and it definitely requires fair amount of time.

    At the same time, I have yet to see any big Symfony 1.x project that was converted to 2.x. The db schema can probably live without big changes, but I suspect the amount of code rewriting will be the same or even bigger here than in Drupal world.

  • Drupal 7 vs Symfony 2: overview after 1 year of Symfony development   2 years 46 weeks ago

    With statements like "The same project will cost roughly twice as much developed in Symfony, comparing to Drupal, and will take twice as much time.
    I think the learning curve is approximately the same for Drupal7 and Symfony2" - I wonder if you are factoring in project life cycle (i.e. development over time).

    What I've found with drupal is that major version upgrades (on reasonably sized sites on up to more complex with lots of modules) are a complete pain requiring you to essentially rebuild your site. While with a framework, you can likely stay up to date more easily and focus on adding features and improving performance over the years.

    While you could argue that this rebuilding time is a good time to rebuild functions, etc. - it also involves essentially spending hours/months rebuilding things that worked fine to begin with.

    I think when you factor upgrades and feature additions in over time a framework will likely win for anything but the most basic of sites - and for those drupal if you follow all the conventions is as good as it can be in my opinion.

  • Adding "Price" field to Ubercart cart page   2 years 48 weeks ago

    Hello,

    which is the file where you have to write this code? I'm desperate

    Thans !!!

  • Writing robust code that uses fields, in Drupal 7   2 years 50 weeks ago

    Hey, how to work with empty fields with wrappers?

    I'm always getting the exceptio when the field is empty:

    EntityMetadataWrapperException:
    Unable to get the data property [prop name (amount)] as the parent data structure is not set.

    Here is my code:
    $order_wrapper->owner->field_discount_limit->amount->value() // field_discount_limit is empty

  • Be careful with drupal_get_form() in theme layer   2 years 50 weeks ago

    This saved my day! Thank you very much!

    Now to something completely different: I need a Beer. print render($beer);

  • Drupal 7 vs Symfony 2: overview after 1 year of Symfony development   3 years 1 week ago

    Hi :)
    I'd like to come back to the following part:

    The same project will cost roughly twice as much developed in Symfony, comparing to Drupal, and will take twice as much time.
    I think the learning curve is approximately the same for Drupal7 and Symfony2.

    Is this true? If you got several projects with Symfony and write own bundles for reoccuring problems (login, content creation, base theme etc.) in which way does it take more time than using Drupal?

    I know, as an Drupal Developer, that some custom features can be a pain in the ass to implement in Drupal, mostly due to the "Drupal way". If, after some time, you had such a list of own bundles, ready to use in a new project, wouldn't that kickstart your development?

  • Writing robust code that uses fields, in Drupal 7   3 years 3 weeks ago

    It ends up being
    $wrapper->field_image->file->value()->uri

Drupal association member