I'm reading Pro Drupal Development, Second Edition. It says that the following is necessary:
t("Your favorite color is !color", array('!color' => "$color"));
But it also says that the ! placeholder means that no transformation will be done on the string. So why not just:
t("Your favorite color is $color");
Thanks.
...
What is the best application workflow metaphor for Drupal module?
In PHP frameworks we think MVC-style. How do we think inside Drupal?
Asumming I am writing some user-oriented module like Shop, Catalog or Forum.
As far as I understand there are no or few MVC based modules.
Should I generally treat Drupal modules (as sub-application) as ...
For some reason one of my Drupal installations doesn't include jquery.js automatically.
The most strage thing is that on local hosting all themes include jquery, but on
remote hosting the theme I am using - wabi - for some reason doesn't include jquery, and as I see, $scripts variable in page.tpl.php is empty. My initial expectation was ...
I know this can probably be done with CCK and a view, and maybe a logo content type. But I was wondering if anybody knows of the BEST way to do the following (perhaps there is a module that does this already):
I want SEASONAL displays of my logo. I.e. If I create a CHRISTMAS version of my logo, with for example a a christmas hat in the ...
Hi all
I'm developing a web site using drupal cms.
I have installed a module called slider module which is used to slide a page with
sliding effect, it uses jquery.
But it doesn't work in internet explorer 6, it doesn't display anything and no sliding effect.
Does anyone know what the problem might be?
Thanks
...
My view holds a list of nodes ranked by rating (vote-API/Fivestar).
I wish user to hide nodes they do not wish to see in this view. Can this be done?
...
I'm familiar with wordpress and cakePHP; however, I'm building a small community website (hobby) that allows users to post music sheet (pdf/image) or guitar tabs ( text files). These music sheets should be organized by artists and songs. I've already built my own cms, but I'm not looking forward to maintain it as i'm scared I won't have ...
I am a bit newbie in Drupal theming and I can't get one detail in Forum modules theming.
forum.module file contains forum_theme function that controls how this module is themed
and has this line
function forum_theme() {
......
'forum_list' => array(
'template' => 'forum-list',
'arguments' => array('forums' => NULL, 'parents' => NUL...
Is info about Drupal RSS feed signups available?
May be some special module?
Or one only has to use feedburner?
...
I want to redirect this the request for "homebox/1" to "homebox/1/[uid]" if a logged in user tries to access it. I do not care about annonymous users at this point yet.
This is the code I put into the top page-homebox.tpl.php:
if(!is_numeric(arg(2))){
global $user;
if($user->uid){
if(count($_GET) > 1){
$get = array();
foreach($_GE...
I would like to have a Google Adwords conversion trigger when a new node is submitted on my Drupal 6 site, but cannot find a way to do this.
Basically I want a user to submit some details into a custom node type, let's call it "Player". When a new Player is added, I want to trigger an Adwords conversion. I have looked at the Custom (For...
Users on my site can add nodes of a custom type (let's call it "Player") but cannot publish them. Effectively they need moderating before posting. Once an admin / moderator has published them, I want the owner / publisher to be changed to an the relevant admin / moderator. This is so that the user is be unable to edit them and also so it...
For the installation of apache solr integration module in Drupal we need to install solr.
The must do thing is we need to change the solr schema.xml and configure.xml files with the files in apache solr integration module.
can any body explain the reason behind this change.
...
Is it possible to suppress the status messages set by drupal_set_messages() for certain roles? One client does not want certain roles (anonymous) to see these messages.
...
I'm trying to show updated results for a CCK Computed Field.
The computation is based on fields in another node, so are not being automatically updated.
So: I'm calling node_save($node) in hook_view, which does make the adjustment but the results don't show until I refresh the page.
Is there a way to refresh the page automatically, o...
Hello,
Can you recommend a drupal module that provides a syntax highlighting input filter? Good coverage of less known programming languages would be nice.
...
So I've gone and customized the user login/pass/register pages Drupal 6 and no problems. However I now do the same thing with the contact mail page (contact module enabled) and all I get is the contact form and NO theme. What am I doing wrong?
function mytheme_theme() {
return array(
'user_login' => array(
'template' => 'use...
I need to implement an OR operator between some filters in a Drupal View.
By default, Drupal AND's every filter together.
By using
hook_views_query_alter(&$view, &$query)
I can access the query ( var $query ) , and I can change either :
$query->where[0]['type']
to 'OR', or
$query->group_operator
to 'OR'
The problem is however...
When you get a description of some project that should be made with Drupal, and requires some extra-functionality (beyond core and most popular modules), how do you decide how're going to do it?
Do you spend a day or two (or week?) searching for all possible modules, narrowing down the list?
What is the cricial point to start writing o...
I've created a custom content type with CCK.
If I need to add some custom code for validating fields of this content type's record form, where do I add the code and which functions are best for this task?
...