Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-29-2006, 11:33 PM
bhxtyrant bhxtyrant is offline
 
Join Date: Jun 2005
Posts: 205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default custom border image around images created with [img] tags

Hey guys,Hope this is the right place but i am trying to do something but am in the dark on how.

Basically i want to edit the default code used to [img] tags.I would basically like to add my own custom border image to it so when an image is posted using the [img] tags the border will be displayed around images.However i am unsure of how to go about this.I know how to code it i just dont know there to find the code that does this.Any help would be great.Thanks
Reply With Quote
  #2  
Old 08-30-2006, 12:20 AM
The-Ensemble's Avatar
The-Ensemble The-Ensemble is offline
 
Join Date: Jul 2006
Location: United Kingdom
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd suggest creating a BB code. Much easier and then you can always create various version and borders with bb codes :P
Reply With Quote
  #3  
Old 08-30-2006, 01:02 AM
bhxtyrant bhxtyrant is offline
 
Join Date: Jun 2005
Posts: 205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

EDIT:After thinking this over more i think you are right.So that leaves one question.I created a custom BB code which works for displaying images with the border i wanted.However i havent got a clue on how to make images "clickable links" so a thumbnail can direct to the full image.Any help would be great.
Reply With Quote
  #4  
Old 08-31-2006, 03:07 AM
bhxtyrant bhxtyrant is offline
 
Join Date: Jun 2005
Posts: 205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump
Reply With Quote
  #5  
Old 08-31-2006, 12:41 PM
The-Ensemble's Avatar
The-Ensemble The-Ensemble is offline
 
Join Date: Jul 2006
Location: United Kingdom
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well thats a toughish one.
Why not link the image to the thumbnail, so a thumbnail shows up and link that thumbnail to the full image?
Reply With Quote
  #6  
Old 08-31-2006, 02:47 PM
bhxtyrant bhxtyrant is offline
 
Join Date: Jun 2005
Posts: 205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello again,
Thats actually what i am trying to do but either i did something wrong or it isnt working correctly.When i add the thumnail image that works fine but when i try to link it to the full image it just wont work and messes up the custom bb tags.Could you perhaps post an example so i can double check to see if mine is correct?
Reply With Quote
  #7  
Old 08-31-2006, 03:06 PM
The-Ensemble's Avatar
The-Ensemble The-Ensemble is offline
 
Join Date: Jul 2006
Location: United Kingdom
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now I'm getting kinda confused try to sort this one out. I'm thinking maybe create a justify box, and insert your thumbnail inside it, So the border wraps around it leaving no gaps and have the thumnail linked to full sized image using a [url=http://blah.com/blah.jpg[/url] around the img coding.
Reply With Quote
  #8  
Old 08-31-2006, 09:11 PM
bhxtyrant bhxtyrant is offline
 
Join Date: Jun 2005
Posts: 205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is the code i am using for my custom BB code.It works fine for images/thumbnails but it will no work when trying to add a hyperlink.Hope this helps clear up your confusion.



Quote:
Title-Content Image
Tag-Cimage
Replacment-
<table cellpadding="0" cellspacing="0" style="display: inline; margin:5px; margin-top:5px;">
<tr>
<td width="4" height="4" background="http://www.wumbrella.com/forum/images/re-wu/mainfiles/fr_top_ls.jpg"></td>
<td height="4" background="http://www.wumbrella.com/forum/images/re-wu/mainfiles/fr_top_mid.jpg"></td>
<td width="4" height="4" background="http://www.wumbrella.com/forum/images/re-wu/mainfiles/fr_top_rs.jpg"></td>
</tr>
<tr>
<td width="4" background="http://www.wumbrella.com/forum/images/re-wu/mainfiles/fr_left.jpg"></td>
<td></td>
<td width="4" background="http://www.wumbrella.com/forum/images/re-wu/mainfiles/fr_right.jpg"></td>
</tr>
<tr>
<td width="4" height="4" background="http://www.wumbrella.com/forum/images/re-wu/mainfiles/fr_bot_ls.jpg"></td>
<td height="4" background="http://www.wumbrella.com/forum/images/re-wu/mainfiles/fr_bot_mid.jpg"></td>
<td width="4" height="4" background="http://www.wumbrella.com/forum/images/re-wu/mainfiles/fr_bot_rs.jpg"></td>
</tr>
</table>

Use Option-No
Reply With Quote
  #9  
Old 08-31-2006, 09:14 PM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Find in "includes/class_bbcode.php":
Code:
function handle_bbcode_img_match($link)
	{
		$link = $this->strip_smilies(str_replace('\\"', '"', $link));

		// remove double spaces -- fixes issues with wordwrap
		$link = str_replace('  ', '', $link);

		return '<img src="' .  $link . '" border="0" alt="" />';
	}
Replace with:
Code:
function handle_bbcode_img_match($link)
	{
		$link = $this->strip_smilies(str_replace('\\"', '"', $link));

		// remove double spaces -- fixes issues with wordwrap
		$link = str_replace('  ', '', $link);

		return '<span class="post"><img src="' .  $link . '" border="0" alt="" /></span>';
	}
Now go into your AdminCP -> Styles and Templates Manager -> Choose Main CSS from the Style Dropdown.

Scroll down to Additional CSS Definitions and add this:
Code:
.post image{
	border-style:dashed;
	border-color:red;
	border-width:1px;
      }
Attached Images
File Type: gif Untitled-3.gif (33.7 KB, 0 views)
Reply With Quote
  #10  
Old 08-31-2006, 09:30 PM
bhxtyrant bhxtyrant is offline
 
Join Date: Jun 2005
Posts: 205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks acid but that doesnt help me to much as i dont want a css border i want a border made of custom graphics that i have made.See the code in my post above yours to see what i mean.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:49 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04497 seconds
  • Memory Usage 2,274KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete