This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Disabling Signature's for Drupal

I've been running a fairly large Drupal Community site with the phpbb mod. I've been having problems updating the signatures, as phpbb will allow BBCode, and drupal, even with the BBCode mod, doesn't translate the signatures updating in phpbb. So when i update from phpbb with [img]imghere[/img] i get a working image, where as from drupal i get the writen text [img]imghere[/img]

Ideally i would like to either:

1. Disable signatures from My Account, so they do not update when updating My Account.

2. Make signatures work with BBCode

Troubles with taxonomy

I am building a module that provides a user to enter an address (amongst other things), I am using city and state as taxonomy terms and taxonomy menu to give a simple method to drill down to the data you want...

Instead of using a "categories" block to manage this, I am allowing the user to plug their address into a standard 4 line form, and my hook_insert figures out the taxonomy terms from the form and attempts to insert them.

My sql resulted in

db_query("INSERT INTO {term_node} (nid,tid) VALUES (%d,%d)",$node->nid, $city);

How to wrap a website in drupal

Hello

I am trying to wrap my osticket application in drupal.

ostickets calls
include_once(header)
include_once(includefile)
include_once(footer)

I need to get the content of include_once(includefile_ and return to drupal view function as $output

Could someone please let me know how can I do this?

e.g
function osticket_page(){

$OSTICKET_PATH = drupal_module_path

$output = somehow include_once($OSTICKET_PATH."/includefile)

return $output
}

advanced body attributes

I just set some code up in my template.php to give the body tag some usefull attributes on the way to get some more styling power. It is at a realy early state of development but it kinda works quite nice so far. It allthough became quite feature rich and I thought I'd share the code so far and see what others think. Maybe someone can help me optimise it a bit and I allthogh can see it in a module in the future. Heres what I got in my template.php:

<?php
function css_body_attributes( $arg, $is_front, $sidebar_left, $sidebar_right )
{
$uid = css_uid( $arg, $is_front );
$sec = css_section( $arg, $is_front );
$col = css_columns( $sidebar_left, $sidebar_right );
$usr = css_user( );
$osb = css_useragent( );
$lang = css_language( );
return 'id="'.$uid.'" class="'.$sec.' '.$col.' '.$usr.' '.$osb.'"';
}

function css_uid( $arg, $is_front )
{
if ( is_string($arg(2)) ) $body_id = $arg(0).'-'.$arg(1).'-'.$arg(2);
elseif ( is_string($arg(1)) ) $body_id = $arg(0).'-'.$arg(1);
elseif ( is_string($arg(0)) ) $body_id = $arg(0);
if ( $is_front ) { $body_id = 'front'; }
return 'page-'.$body_id;
}

function css_section( $arg, $is_front )
{
if ( $is_front ) { $body_class = 'front'; } else $body_class = $arg(0);
return 'section-'. $body_class;
}

function css_columns( $sidebar_left, $sidebar_right )
{
if ( $sidebar_left && $sidebar_right ) return 'column-both';

Customizing Final Image display page with Image module

Hi,

Probally a simple question (hopefully!) regarding the image module.

Forum module hacks.. unrolling topics!?

Hi There,

I could do with a bit of advice..

I need to make the topics in the first page of each forum indent & unroll.
Ideally I'd also like to lose the 'Replies' and 'Last Reply' column and display the originating user for each post on each line.

e.g.
Hey cool new forum ( posted by John on 01/MAY/2006 )
re: Hey cool new forum ( posted by Mandy on 01/MAY/2006 )
re: Hey cool new forum ( posted by Lars on 02/MAY/2006 )
I disagree ( posted by John on 02/MAY/2006 )

This is my plan.. please tell me if you think this is a sensible approach or if my assumptions re: how drupal/php works under the hood, are way off mark.

1) Copy the existing forum module files
2) Look through them to find the file containing (a) the bit of PHP that generate the table in question
3) Find the the (b) function/api call it uses to display the thread name
4) Make a renamed copy of this function and hack at it til it returns a formatted string as per the example above
5) Change the code in file (a) leaving just a single column
6) Change the code in file (a) so that it uses the new function.
7) Replace file (a) on my production server with the newly modified file (a)

I don't have time to learn how to write a custom module from scratch; as my php totally sucks ass this is going to be a stretch anyway! Should I be looking in forum.module? Will these mods be overwritten by future upgrades? Is there a faster/simpler way? How long might an experienced drupal developer take to do this sort of hack? I might want to pay/hire someone if it's the waking nightmare I'm expecting it to be!

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions