1
stuie200
Xcgal - Add Blog, HTML [IMG] links under displayed image
  • 2008/6/29 14:39

  • stuie200

  • Friend of XOOPS

  • Posts: 161

  • Since: 2004/1/4 2


Here is another simple hack for people that wish to add direct linking code, [img] tags etc. to displayed image pages for use in other Forums, Gallerys, Email and Blogs

Example can be seen here half way down the page.

Open /modules/xcgal/templates/xcgal_display.html and find the following lines of code
<td class="<{cycle name="keys" values="even,odd"}>" valign="top" nowrap><{$info.key}>:td>
        <
td class="<{cycle name="values" values="even,odd"}>"><{$info.value}>td>
    tr>
  <{/foreach}>
 table>
div><br />

directly below the above on the next line paste the following code
<table width="100%" border="1" align="center">
// bb, img and html code hack by stuie200 @ xoops.org
<form>
  <
tr>
    <
td class="Head">Use this image in  your Forums or Blogstd>
  tr>
  <
tr>
    <
td class="odd"><div align="center"><strong>Share URL strong>Email &ampIM div>td>
  tr>
  <
tr>
    <
td align="center"><textarea name="DirectLink" cols=90 rows="4" readonly="readonly" id="DirectLink" style="text-align:center; padding-top:10px; padding-left:10px; padding-right:10px; overflow:hidden" onFocus="this.select()"><{$xoops_url}>/modules/xcgal/<{$picture_url}>textarea>td>
  tr>
  <
tr>
    <
td class="odd"><div align="center"><strong>Direct  Link strong>Layout Pages div>td>
  tr>
  <
tr>
    <
td align="center"><textarea name="DirectLink" cols=90 rows="4" readonly="readonly" id="DirectLink" style="text-align:center; padding-top:10px; padding-left:10px; padding-right:10px; overflow:hidden" onFocus="this.select()"><{$xoops_url}>/modules/xcgal/<{$picture_url}>textarea>td>
  tr>
  <
tr>
    <
td class="odd"><div align="center"><strong>HTML Code strong>Websites &ampBlogs div>td>
  tr>
  <
tr>
    <
td align="center"><textarea name="Blogs" cols=90 rows=4 readonly="readonly" id="Blogs" style="text-align:center; padding-top:10px; padding-left:10px; padding-right:10px; overflow:hidden" onFocus="this.select()"><img src="<{$xoops_url}>/modules/xcgal/<{$picture_url}>">textarea>td>
  tr>
  <
tr>
    <
td class="odd"><div align="center"><strong>IMG Code strong>Forums &ampBulletin Boards div>td>
  tr>
  <
tr>
    <
td align="center"><textarea name="Forums" cols=90 rows=4 readonly="readonly" id="Forums" style="text-align:center; padding-top:10px; padding-left:10px; padding-right:10px; overflow:hidden" onFocus="this.select()">[img]<{$xoops_url}>/modules/xcgal/<{$picture_url}>[/img]textarea>td>
  tr>form>
table>


Save, upload and then update the xcgal module for changes to apply.

The code is very crude but it does work very well. Maybe somebody can take this and improve on it.

Hope its of some help to somebody

Regards

Stuart
"I'm as confused as a baby in a topless bar."

2
sinor
Re: Xcgal - Add Blog, HTML [IMG] links under displayed image
  • 2008/6/30 2:25

  • sinor

  • Just popping in

  • Posts: 34

  • Since: 2005/1/13


great! i will use it on my site

3
mrphilong
Re: Xcgal - Add Blog, HTML [IMG] links under displayed image
  • 2008/7/11 9:45

  • mrphilong

  • Quite a regular

  • Posts: 351

  • Since: 2006/7/14


I dont think you

<{$xoops_url}>/modules/xcgal/<{$picture_url}>


just

<{$picture_url}>


would be fine.

thanks for the hack.

4
stuie200
Re: Xcgal - Add Blog, HTML [IMG] links under displayed image
  • 2008/7/11 13:08

  • stuie200

  • Friend of XOOPS

  • Posts: 161

  • Since: 2004/1/4 2


Hi mrphilong,

Leaving out the first part as per your suggestion will NOT display the whole URL including the Domain Name and full path to the image.

As i said, i am not a programmer so there may be an easier way to get the full path but i dont know how.

Thanks for the feedback anyway

Regards
Stuart
"I'm as confused as a baby in a topless bar."

Login

Who's Online

306 user(s) are online (230 user(s) are browsing Support Forums)


Members: 0


Guests: 306


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits