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

New flexinode field type: Jabber ID

Can someone familiar with flexinode review my code? I'm pretty new to Drupal. It "works for me" though.

feature req & patch here: http://drupal.org/node/21201

How to call a member function in drupal ?

Fatal error: Call to a member function on a non-object


     ....
    
$num = $soapclient->call('doGoogleSearch', $params, $soapoptions);

.....

Email This Page (or any node) Module Working Great on Drupal 4.5.2

hello all-
took about 5+ hours today-
but i have finally got the email this page module working great on Drupal 4.5.2.

---> can someone please reply as to how i can upload / post this somewhere on drupal.org-
and i will do so immediately... (i didn't just want to paste it into the post...?)

you can check it out live now at: http://www.ralphdeluca.com

click on indivdual pages-
or images-

and you will notice the 'email this page' or 'email this image' links now appearing in the node links for each node.

i also have it turned on for the summary taxonomy views-
pages of categories like images, etc.

please note- this mod is working so sweet...

1- works seamlessly on all types of content nodes-
and can be set to 'email this image', 'email this weblink', etc.-
not just 'email this page'.

2- if you have primary links enabled in a theme- a link to 'email this page' will automatically appear in your primary links menu.

3- if you don't have primary links enabled-
or you are using a phptemplate based theme-
or if you want to simply add it as secondary link menu item-

all you have to do is create a link with a url of: "emailpage"
and again- it works great.

4- of course you can also add a graphic icon / text link anywhere on your template / theme-

OR even just as a block with the simple code of:


Click Here to Email This Page

contact_dir showing only contact's rating

Hi,

I tried to install the latest Version of contact_dir. Installing worked fine but if I want do add a new contact this module shows only the contact's rating select field, see the screenshot. I didn't change my fields.inc neither the contact_dir.module itself.

Empty taxonomy block and debuggging with db_fetch_object

Hey, I'm trying to hack arund with taxonomy block to get, for example, better support of nodes with many terms. But I'm running into odd behaviour with db_fetch_object.

to whit:

$nodescount = db_query('SELECT count(DISTINCT(n.nid)) FROM {node} n CROSS JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid IN (%s) AND n.status = 1', implode($str_tids, ','));
$nodecount = db_fetch_object($nodescount);

returns '3', but

Serious need for a better codefilter

Am I the only one frustrated with the limitations of the existing codefilter module?

On the one hand it has the ability to create beautiful syntax colored php code samples as can be seen in this first example.

Example 1

if ($links) {
	print '<div class="links container">'.$links.'</div>';
}

The problem is that the the nice php syntax coloring is limited to a single set of <?php ?> tags like the above example. Yet so many of the code samples involved with themes and templates jump in and out of php several times. For instance, look here is a typical example of some template code:

Example 2

		<?php if ($links): ?>
				<div class="links"><?php print $links ?></div>
		<?php endif; ?>

For instance, a typical block of html from a node.php.tpl might contain well over 20 sets of inline <?php ?> which forces us to use the <code> </code> tags which don't get to the nice php syntax coloring, on the relevant sections within the <?php ?> tags. Instead, like in the second example above - the whole block is rendered as one monotonous block of code.

But if I leave out the <code> </code> tags in an effort to gain syntax coloring, the same block of code is displayed as several separate, boxed codeblocks. Here is the same exact code used in example 2 above, but without the surrounding <code> </code> tags:

Example 3
if ($links):

endif;

The resulting code sample is not only unrecognizable in format, but it is missing the inline html altogether, so it and therefore useless for the purpose of discussion.

What I really need is a way to provide a block of sample code so that it displays like Example 2, but with the pretty syntax coloring of Example 1 on the relevant strings between the <?php ?> tags.

I realize that the existing codefilter, is really only meant to be a simple filter without a lot of bells and whistles, and I can appreciate that.

It's just that so many of the topics discussed in these forums are already very difficult to talk about as it is -- anything we can do to increase the ease and consistency of producing sample code for discussion is a direct benefit to the whole community.

There are many great existing syntax coloring text functions already in wide use on the web, most of which are capable of jumping in and out of php sections with ease -- a good example is the PEAR :: Package :: Text_Highlighter -- but for some reason I am having trouble integrating any of them into the Drupal input formats.

I have also monkeyed with the existing codefilter module, trying to create a crossbreed of the two filtering types, but I'm getting nowhere.

Does anyone have any ideas or techniques that will help me better achieve better code highlighting?

Pages

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