Welcome to Geeklog, Anonymous Sunday, November 24 2024 @ 05:59 pm EST

Geeklog Forums

Div Tag Hack


Jeff

Anonymous
Ok i dont know if this is possible but wha i want to do is have drop shadows around images that I upload and or reference through an HTML link in my stories. So what I was thinking was is there a way that I can when any image tag is seen tag it and wrap a div tag with a class around it before importing it into my database ? SO I can put the drop shadow on image automatically rather than doing a search and replace everytime someone uploads an articel with images?

Thanks guys
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
editing lib-common.php if you are brave--i'm not--is probably the way to go here. you would be interested in "function COM_article." you could probably get away with modifying this function and putting it into your lib-custom.php or maybe your theme's functions.inc... i'm not sure.
look around line 475 for a starting place.
Text Formatted Code
            $topicimage = '<img align="' . $_CONF['article_image_align']
                    . '" src="' . $imagebase . $T['imageurl'] . '" alt="'
                    . $topicname . '" title="' . $topicname . '" border="0">';
            $article->set_var( 'story_anchortag_and_image', '<a href="'
                    . $topicurl . '">' . $topicimage . '</a>' );

 
 Quote

Status: offline

drshakagee

Forum User
Full Member
Registered: 10/01/03
Posts: 231
Quote by machinari: editing lib-common.php if you are brave--i'm not--is probably the way to go here. you would be interested in "function COM_article." you could probably get away with modifying this function and putting it into your lib-custom.php or maybe your theme's functions.inc... i'm not sure.
look around line 475 for a starting place.


I think that code is just for topic icon images. The functions to edit to add a div tag to the article images is I believe, in admin/story.php, replace_images() and insert_images() you need to edit both as far as I can tell and your strings should be exactly the same.
Yes I am mental.
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
[QUOTE by drshakagee]I think that code is just for topic icon images.[/QUOTE]yes, of course, you are right. what was i thinking? thanks
 Quote

All times are EST. The time is now 05:59 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content