Lesson, tutorial, or howto

cithukyaw's picture

Upload Photo link in Image Gallery

Hi Drupalers

I have a link "Upload Photo" in image-view-image-gallery.tpl.php. It is created from mytheme_preprocess_image_view_image_gallery().

<?php
function mytheme_preprocess_image_view_image_gallery(&$vars, $hook){
    if(
user_access('create images')){
       
$view = $vars['view'];
      
$links[] = array('title' => 'Upload photo', 'href' => 'node/add/image','query'=>'tid='.$view->args[1]);
    }
 
$vars['links'] = $links;
}
?>

Here is the code for image-view-image-gallery.tpl.php

<?php
print theme_links($links);
?>

Read more
cithukyaw's picture

Print Links in $content variable

Hi Drupalers,

I have the print module in my site. Print links are rendered into the $content variable.
But, I can't find the print links in $content in mytheme_preprocess_node().

My goal is to place the print links anywhere I like in the template file, but print links are included in the $content variable in theme level.
How can I separate the print links from the $content ?
Any idea ?

Read more
pyone's picture

WYSIWYG is not displayed in panel pane popup

WYSIWYG is working fine in other pages but it is not displayed in panel popup pane.
How can I make it display?

I use
Panel 6.x-3.9, TinyMCE editor
WYSIWYG 6.x-2.3
Drupal 6.

Read more
cithukyaw's picture

Simulating admin block list

Hi Drupalers,

I have a registered menu ( siteadm/block/list ) referring to admin/build/block.
After submitted "Blocks" form, I want form redirection to siteadm/block/list.

I changed $form['#redirect'] in hook_form_alter of my module, but it doesn't work. What could that happen ?
It still redirects to admin/build/block.

I got to hack the core module "block".
My purpose is to let customer access to the page admin/build/block with my custom menu ( siteadm/block/list ) and I want to make the page admin/build/block as my own.

Any idea ?

Read more
cithukyaw's picture

Node Editable Setting

Hi Drupalers,

Which module is suitable for the following features ?

- node editable settings in node hierarchy
- user can choose his posted node to be editable or not
- two types of editable setting :
- Inherit - node follows its parent editable setting, meaning that if parent node is editable, it can be edited, or it cannot be edited.
- Explicit - node editable setting will not depend on its parent node setting.

Read more
cithukyaw's picture

Modifying "Create new blog entry" link

Hi Drupalers,

The blog module creates a link "Create new blog entry" in the page "q=blog".
It just outputs by calling theme("item_list", $links) in the function blog_page_last().

I want to override it with theme("links", $links).
How can I do this ?

Read more
cithukyaw's picture

Modifying a cck text field to yield a link

Hi Drupalers,

How to modify a cck text field to yield a link ?
I have a cck text fields with validation handler valid_url(), but it renders a plain text, not a link.

I think you will have a question - why not use cck link module ?
The reason is
1) cck link not validate "http://", it accepts internal path.
2) In my custom theme, it disappeared in node creation form, but it works on other default themes.

Thus, I changed my mind to use a text field with validation handler.
Unfortunately, it doesn't render a link in node content.

Any idea ?

Read more
cithukyaw's picture

Group home page style like Drupal Dojo

Hi Drupalers,

I would like to create OG group home page similar to Drupal Dojo.
The page has two tabs - View ( will be renamed as Home ) and Discussions.
The second tab is ok for me by using view template og-ghp-discuss cloning from og-ghp-ron. It shows discussions of the current group.

I'm struggling with the default tab "View". I'm finding out :
1. How to rename this tab "Home" from "View" ? ( May need to add a new tab "Home" and remove the "View" tab )
2. The Home tab will display 3 types of information ( 3 blocks ) like Drupal Dojo home page.

Read more
cithukyaw's picture

Display Blocks on certain pages

Hi Drupalers,

I have two blocks - "Recent Blog Posts" and "Popular Blog Posts".
I would like to hide these blocks in all pages except blog related pages.
How can I do that ?

Read more
samcohen's picture

Mastering Drupal: An 8 week intensive online course

Start: 
2011-03-16 20:00 - 23:00 America/New_York
Organizers: 
Event type: 
Training (free or commercial)

I have developed and will be teaching an 8-week intensive online course on mastering Drupal. I've built over 50 Drupal sites and have a great deal of experience training people to build sites with Drupal.

I'm also giving anyone who is a Drupal Association member or works for a nonprofit a ten percent discount.

You can read a full description of this Drupal training program here . I'll also be offering a summer bootcamp.

Thank you,
Sam Cohen

Sam Cohen, Principal

Read more
Subscribe with RSS Syndicate content

Drupal Dojo

Group organizers

Group events

Add to calendar

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: