Hi,

I have gone thru some posts on this topic, but a couple of hrs later i emerged more confused, so it would be great if some one could help me.
I am relatively new to PHP and Drupal. I can handle PHP, but cant find my way around Drupal's module's source codes.

I have two drupal installations that I manage for my new start-up - pc.lare.in and uniblocks.lare.in - both act as knowledge bases for the products we sell.

On the page here: http://uniblocks.lare.in/refdata
I have used img_assist to display lots of 200px images on a single page - sort of like a visual index.

In some cases I have had to add " " in the Description field of the image assist filter tag :

[img_assist|nid=94|title=UB-0101|desc=Grid BaseBoard                     |link=url|url=http://uniblocks.lare.in/refdata/ub-0101|align=left|width=200|height=200]

If I dont add whitespaces then the layout collapses and the images don't appear neatly spaced. I could use tables but I wanted to keep everything simple and tables dont behave nicely when browser window is resized (or a lower resolution netbook is used).

The thing is in this case the "title" and "alt" attributed of the IMG HTML tag to have " "s and when ever I hover the mouse over the image for "UB-0101 Grid BaseBoard" I see this in the floating box:

"UB-0101 Grid BaseBoard                     "

The alt and title attributes of the img tag are responsible for this.

How do I modify img_assist.module to do either the following:
1) remove all occurrences from title+desc while img_assist parses filter tag to generate the HTML code for Only local images are allowed..
2) or at least preventing img_assist from outputting title and alt attributes altogether.

I have tried modifying img_assist.module but havent been successful (i think i am not able to differentiate between built-in PHP functions and those belonging to drupal :) )

I would really appreciate a push in the right direction - I foresee a regular need to modify module source code for my two installations.

Comments

lithiumhead’s picture

hi , figured it out myself:

In "img_assist.module"

Change:
// Change the node title because img_assist_display() uses the node title for
// alt and title.
$node->title = strip_tags($caption);

To:
// Change the node title because img_assist_display() uses the node title for
// alt and title.
$node->title = str_replace(' ', '', $attributes['title'].' : '.$attributes['desc']);