UBB.Dev
Posted By: Hussein Instant Images - 04/12/2005 9:27 AM
Currently when a user posts a topic, there are two columns beneath the main message window: Instant Graemlins and Instant UBB Code(TM). My suggestion is to add a third column, called Instant Images. LK helped me with this mod back when I was using version 6.3 and it worked perfectly using the Instant Graemlins javascript. I used the mod to insert Arabic expressions as images instead of text, since not everyone has the Arabic language enabled in their operating system. The mod can be used for any images to be inserted. I had buttons similar to the Instant UBB Code buttons with an abbreviation of the Arabic expression and when a user selected the button, it would automatically insert the UBB image code and the link for the image.

I have not been able to adapt it to version 6.7, so if anyone can figure out how, I would appreciate it.
Posted By: AllenAyres Re: Instant Images - 04/12/2005 10:31 PM
Should be relatively easy to adapt, do you have the code from your old version still?
Posted By: Hussein Re: Instant Images - 04/13/2005 7:38 PM
For New Topic, Reply to Post, PM and Edit Post:

Code
Find:
-----
<TR bgcolor="$vars_style{TableColorStrip}">
<TD valign="top" width="33%">
<font face="$vars_style{FontFace}" size="$vars_style{TextSize}" color="$vars_style{TableStripTextColor}"><b>
$vars_wordlets{instant_graemlins}
</b></font></TD>
<TD valign="top" width="67%">
<font face="$vars_style{FontFace}" size="$vars_style{TextSize}" color="$vars_style{TableStripTextColor}"><b>
$vars_wordlets{instant_ubbcode}
</b></font></TD>
</TR>
<TR bgcolor="$vars_style{AltColumnColor1}">
<TD valign="top" align="left">
$smilie_list

</TD><TD valign="top" align="left">
<font face="$vars_style{FontFace}" size="1">
$ubb_code_buttons
</font>
</TD>
</TR>
Replace with:
-------------
<TR bgcolor="$vars_style{TableColorStrip}">
<TD valign="top" width="33%">
<font face="$vars_style{FontFace}" size="$vars_style{TextSize}" color="$vars_style{TableStripTextColor}"><b>
$vars_wordlets{instant_graemlins}
</b></font></TD>
<TD valign="top" width="34%">
<font face="$vars_style{FontFace}" size="$vars_style{TextSize}" color="$vars_style{TableStripTextColor}"><b>
$vars_wordlets{instant_ubbcode}
</b></font></TD>
<TD valign="top" width="33%">
<font face="$vars_style{FontFace}" size="$vars_style{TextSize}" color="$vars_style{TableStripTextColor}"><b>
Instant Graphics
</b></font></TD>
</TR>
<TR bgcolor="$vars_style{AltColumnColor1}">
<TD valign="top" align="left">
$smilie_list

</TD><TD valign="top" align="left">
<font face="$vars_style{FontFace}" size="1">
$ubb_code_buttons

</font>
</TD>
<TD valign="top" align="left">
<a href="javascript: x()" onclick="DoSmilie('img.gif');"><img src="$vars_config{NonCGIURL}/bbtitle.gif" border="0" alt="Title"></a>
</TD>
</TR>
Posted By: AllenAyres Re: Instant Images - 04/13/2005 11:29 PM
is that it? Looks relatively easy... do you have a link to an example?
Posted By: AllenAyres Re: Instant Images - 04/14/2005 5:17 AM
Untested:

OPEN public_common.pl

FIND:

Code
$instant_ubbcode_block = qq~
$TBT

<tr bgcolor="$vars_style{TableColorStrip}">
<td valign="top" width="25%">
<font face="$vars_style{FontFace}" size="$vars_style{TextSize}" color="$vars_style{TableStripTextColor}"><b>
$vars_wordlets{instant_graemlins}
</b></font></td>
<td valign="top" width="75%">
<font face="$vars_style{FontFace}" size="$vars_style{TextSize}" color="$vars_style{TableStripTextColor}"><b>
$vars_wordlets{instant_ubbcode}
</b></font></td>
</tr>

<tr bgcolor="$vars_style{AltColumnColor1}">
<td valign="top" align="left">
$smilie_list
 
</td><td valign="top" align="left">
<font face="$vars_style{FontFace}" size="$vars_style{FDTextSize}">
$ubb_code_buttons
</font>
</td>
</tr>

$TBB
~;
REPLACE WITH:

Code
$instant_ubbcode_block = qq~
$TBT

<tr bgcolor="$vars_style{TableColorStrip}">
<td valign="top" width="25%">
<font face="$vars_style{FontFace}" size="$vars_style{TextSize}" color="$vars_style{TableStripTextColor}"><b>
$vars_wordlets{instant_graemlins}
</b></font></td>
<td valign="top" width="45%">
<font face="$vars_style{FontFace}" size="$vars_style{TextSize}" color="$vars_style{TableStripTextColor}"><b>
$vars_wordlets{instant_ubbcode}
</b></font></td>
<td valign="top" width="30%">
<font face="$vars_style{FontFace}" size="$vars_style{TextSize}" color="$vars_style{TableStripTextColor}"><b>
Instant Graphics
</b></font></td>
</tr>

<tr bgcolor="$vars_style{AltColumnColor1}">
<td valign="top" align="left">
$smilie_list
 
</td><td valign="top" align="left">
<font face="$vars_style{FontFace}" size="$vars_style{FDTextSize}">
$ubb_code_buttons
</font>
</td><td valign="top" align="left">
<font face="$vars_style{FontFace}" size="$vars_style{FDTextSize}">
<a href="javascript: x()" onclick="DoSmilie('img.gif');"><img src="$vars_config{NonCGIURL}/bbtitle.gif" border="0" alt="Title"></a>
</font>
</td>
</tr>

$TBB
~;
Posted By: Hussein Re: Instant Images - 04/16/2005 9:09 AM
Tested and working.

Thanks Allen!
Posted By: AllenAyres Re: Instant Images - 04/18/2005 1:42 AM
well good, glad it worked for you smile
© UBB.Developers