This forum is for assistance with theme development.

Company or designers that does custom templating

Are there any companys or designers that are experienced in doing custom themes using Drupal?
I'm finding its a bit difficult to design a layout and then to work it with the template systems.

Theme used on drupal.org

Is the theme used on drupal.org available to download anywhere? I would very much like to use it as a base to develop my own theme.

Yours hopefully

Ben Francis
http://hippygeek.co.uk

Integrating Drupal header into SMF forum

Hi,

My website consists of Drupal providing the content and a SMF (Simple Machines) forum. I am wanting to include the Drupal header at the top of all forum pages so I have a consistent header throughout my site.

I am able to edit the Simple Machines template files so that I can insert the header code from Drupal. What I would like to know though is the best way to access the Drupal variables required in the forum template, these would be $logo, $site_name, $site_slogan and $primary_links.

Any help would be much appreciated, thanks, fondie

Advice on theme with two-column layout

Hi,

I am in the process of turning my website into a Drupal site and implementing a new design. I want it to be a two column layout however I do not plan to use any blocks (if possible) and I wonder how to implement this. This is the layout (ignore the typo! :) ):
http://putfile.com/pic.php?pic=11/31316105140.png&s=x11

For the first page (main page of site):
A. Recent stories posted.
B. General information about the site, "welcome blah blah", I want this editable as a Page preferably.
C. Static navigation, this will be a Flash movie and will be static and coded in the template.

For news and blog subpage:
A. This is where the story is shown.
B. Past stories, show calendar or list of stories.
C. -same-

Other pages (generic content):
A and B. Using Page type nodes for full-width text or two columns (50%/50%).

Any idea how I could achieve this?

Secondly, I am unsure how I would go about administering this site lacking a blocks menu. Could I use an otherwise unused DIV for the lefthand menu and use the full-width area (A and B) for content or would I have to designate two separate DIVs below the other elements? Could I use another theme only available to me so that I can administer the site easily?

I want members to be able to contribute and create content, in this case comments on Pages, Stories (and/or Blog entries) and I realize this could be hard without any space for Blocks. I would only need a small area for these links so I am thinking of implementing these Blocks as boxes/paragraphs in column A.

spreadfirefox theme and page numbers

Is there a way to get the spreadfirefox theme to display the page numbers (eg "first page previous page 1 2 3 next page last page") below the last article on the page instead of below the lowest side block? The footer should remain below the lowest block. The interlaced theme does it this way. Spreadfirefox puts it below the lowest block (just above the footer) which can be quite a distance from the bottom of the last article causing some to overlook the fact that there are more pages available.

Workaround: block translation using flexinode and i18n

Hi,

Using flexinode.module and i18n.module I have managed to create multilingual blocks.

Here's what I've done and I'm looking forward to some comments, as I want to know how useful this workaround might be and what kind of polishing it needs :) I'm not a programmer, so please keep your comments simple and understandable...

It started with my wish to have some kind of news / sidenotes / links in the sidebar of my website. Therefore I needed: title, link, date, content.

First I created a flexinode called "sidenote", which got id 2, so let's say flexinode-type 2. As flexinodes are connected with their nodedata, I already had a title and a date. Therefore I defined two additional flexinode fields: link (which was given id 16) and content (which was given id 18). Now I was able to enter the necessary content just as easy as stories, blogposts, et cetera.

Second I had to create some php for the block. Using php I wanted to take care for both logic and themeing. First time ever... But I got it done, wooohaaa! For explaining the basic idea, I will suffice with quoting my code, as the comment lines will explain the logic. I implemented this code as part of a new block, which has been made visible in the right sidebar. Now all content of type sidenote (type 2) is showed as short stories with a title, link, date and content in the right sidebar and, moreover, in the right language as well! I also added a link at the bottom of the sidebar, which links to an overview page using taxonomy terms (this part needs some polishing definitely...).

The result can be found here:

NOTE
At the bottom of the code there are a lot of comment lines; these are for future use, when I want to show certain sidenotes in certain sections, using sections.module.

As said before: I'm looking forward to some feedback, thanks in advance!

Marc


<?php

// determination of the site's language using i18n.
$site_language = _i18n_get_lang();

// definition of flexinode-type for creating content:
// - 2 = custom defined type for nodes in sidebar (sidenotes).
$flexinode_type = 2;

// defintion of flexinode-type fields providing content:
// - 16 = custom defined field for storing weblink;
// - 18 = custom defined field for storing content.
$flexinode_field_link = 16;
$flexinode_field_body = 18;

// initialization of sidebar's block.
$block_initialized = FALSE;

// query:
// selecting (flexi)node data
// where the flexinode-type is the one for sidenotes
// and the node's language is the site's language
// and the node's status is published
// sorted by date created.
$result_fn = db_query
(" SELECT *
FROM {node} n
, {flexinode_data} fn_d
, {flexinode_field} fn_f
, {flexinode_type} fn_t
WHERE fn_t.ctype_id = '$flexinode_type'
AND fn_t.ctype_id = fn_f.ctype_id
AND fn_f.field_id = fn_d.field_id
AND fn_d.nid = n.nid
AND n.language = '$site_language'
AND n.status = 1
ORDER BY n.created DESC
");

// loop for every row of the query above.
// NOTE: one node will have multiple rows,
// namely one for every flexinode field.
// rows for one node are next to each other,
// because of ordering by date and time created.
// the transition from one node to another
// will be determined by comparing:
// - $previous_node;
// - $current_node.
while ($row = db_fetch_object($result_fn))
{
if ($block_initialized == FALSE)
{
// at the start of the first loop,
// the block needs to be initialized:
// row defines $current_node and $previous_node.
$previous_node = $row->created;
$current_node = $row->created;
$block_initialized = TRUE;
}
else
{
// at the start of other loops,
// row defines $current_node only.
$current_node = $row->created;
}

if ($current_node < $previous_node)
{
// if $current_node and $previous_node are not equal,
// the query has just entered the data of another node,
// so the gathered content needs to be printed
// and $previous_node needs to be updated.
print ' ' . $titel . '' . '

Pages

Subscribe with RSS Subscribe to RSS - Theme development