Recent Topics

1 Mar 20, 2005 01:35    

Hi there all:

In the b2evo "upload a file/image" tool, the code that is automatically generated is after you upload a pic is:

<img src="[image details]" border="0" alt="" />

I would like to set it so the auto-generated properties adds a border, an hspace, a vspace and an align specs, so that it automatically inserted code becomes:

<img src="[image details]" border="1" hspace="10" vspace="1" alt="" align="left" />

Poked around in the code but could not find where and how to set this up.

I appreciate and and all feedback/tips!

Mike Wester
www.thatsbj.com

2 Mar 20, 2005 08:09

Go to the admin folder and open b2upload.php.

I edited it to move from..

<img src="[image details]" border="0" alt="" />


to

<img src="[image details]" alt="" class="" />

3 Mar 20, 2005 09:02

oh - that's a lovely hack. I'm going to try left align and 10 px spacing as default and then folks can just alter the text for something different.

Does this work for adding an image from teh [img] button on the top of the posting bar or would I have to hack another piece of code

4 Mar 20, 2005 12:43

Does this work for adding an image from teh [img] button on the top of the posting bar or would I have to hack another piece of code

No, you have to go into plugins/toolbars and edit the _quicktags.toolbar.php

and look for

function b2evoInsertImage(myField)

I added a class prompt as I prefer to set image formats and style within the CSS and not via these input prompts.

eg:

myValue = '<img src="'
						+ myValue
						+ '" alt="' + prompt('<?php echo T_('ALTernate text') ?>:', '')
						+ '" title="' + prompt('<?php echo T_('Title') ?>:', '')
						+ '" class="' + prompt('<?php echo T_('Class') ?>:', '')
						+ '" />';

5 Mar 21, 2005 00:19

I've got the image upload hack working fine to include vspace hspace and align. the scond one the one for the toolbar images is not so obvious to me - it'll take me a while to get it


Form is loading...