This forum is for assistance with theme development.

blog php snippet or something

hey guys

im looking for a snippet that i can paste into my page.tpl.php file that will automaticly display the last 5-10 recent blog posts

and im not sure if it can be done but i am not using blocks i just wanted to set up my page using css and just add the snippet between my div tags kind of like this

if ($sidebar_right != ""): print $sidebar_right

endif;

Theme vanishing puzzle - where have they gone?

Hello,

I'll admit, I did add quite a few to test out different styles - the trouble is, now I am only being shown six themes. I do have the 'meta' theme installed, and several other themes, but cannot fathom out why I can only see some of them on my admin screen. This is a new problem that did not occur before. The trouble is, I have been making so many changes to my site, i could not tell you when they started disappearing.

So, my question(s). Is there a default number for the drupal to show of themes, and if so, how do I override this?

Outputting upload_image thumbnails

Hit my next problem; hope someone out there can point me in the direction since I'm fairly sure this one is easier than the last.

I've overwritten my CCK created node template (node-content-car.tpl.php) so that I can completely control the format rather than output $content. My first problem is I want to output thumbnails (I'm using upload_image module) with links to the full image node and I can't for the life of me get it to work. I thought the code below would do the trick.

Finally! a fix for the Access control table breaking layout in Drupal 4.7

One thing that has been bugging me for months is the fact that a lot of administration tables break the layout of a website. One that was especially annoying was the Access Control table. Because of the way it shows checkboxes and list roles it was irritating. I came up with a solution in Drupal 4.6 but 4.7 escaped me for months until now.

So since I talked up the channel nine theme I had to come up with a solution for this problem. Since doing this was not straight forward I am posting a link to a tutorial.

Strategies for sending different versions of site depending on detected bandwidth?

Hi There -

Hope I'm in the right place for this question. Please let me know if there's a better place to post this.

I'm working on a site that will be need a version for low bandwidth and high bandwidth.

One of the purposes for the site is knowledge transfer from the developed world to the developing world. The users that we'll be serving in the bandwidth challenged regions have speeds that are a lot less than what you'd get with a 56k modem. My collegues who have visited the locations have told me that it's painful to watch. They also are dealing with 600 x 800 screens, and the occasional 400 x 600 screen. Ouch!

Meanwhile, I want the site to be rich enough to accumulate great content so that people and organizations who have whizbang bandwidth will find their experience satisfying as well.

So I was thinking two sites running off the same database. . . or a very light theme and another more bandwidth intensive theme - using bandwidth detection javascript I found.

ID-ing your Theme Function - update on code from _Building Online Communities With Drupal, phpBB, and WordPress_

Hi There -

Was going through the exercises in Robert Douglass' book: _Building Online Communities With Drupal, phpBB, and WordPress_ and got to page 172, Exercise 5-3. This is a very cool little piece of code that, when inserted into theme.inc (in the includes directory) replacing the theme() function, inserts comments into the html of the code indentifying which themable function each piece of html is generated from. All you have to do is view source and you see what makes what on your page. Way nifty.

I couldn't get it to work and wrote to Robert Douglass, who kindly gave me updated code that works with Drupal 4.7.3.

It worked flawlessly the first time I tried it.

At his request, I'm posting it here:

Pages

Subscribe with RSS Subscribe to RSS - Theme development