Get XOOPS XOOPSXOOPS FAQFAQ ForumsForums NewsNews ThemesThemes ModulesModules
New Posts New Topics All Posts All Forums Index General Modules Themes Development International XOOPS.org

Search

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: Jun 30
Gross Amount: $25.00
Net Balance: $23.57
Left to go: $76.43

Donations
Anonymous ($15)Jun-14
Anonymous ($10)Jun-10

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

2 2.5 2.6 3.0 87 2013 Abuse admin Amazon AntiHarvesting AntiMalUser AntiSpam API bags Beats billige black Blocks blue Bootstrap Captcha cell Christmas chronolabs content Conversion demo docek download Dresses editor evden eve facebook floor free herre Honeypot Human IP IPInfoDB jQuery kantor lamps Language log logger Lucire mobile module modules Monster mulberry MyAlbum-p newbb news online PageRank pandora Password Permissions pink Plugin portal preloader Prevention profile project propose Protector publisher Rights rmcommon Room sale security Server site Smarty SOAP Songlist Spam stem Studio tag tags tdmcreate template Theme themes TinyMCE User userlog website Whitepaper Wishcraft XIPS xoops Xortify ZendFramework

New Users

Registering user

# 136114

sinewat

Welcome to XOOPS!




Bottom   Previous Topic   Next Topic  Register To Post



#1 Posted on: 2010/9/29 7:36 Improve default captcha - trouble with language define and path
hi'

First sorry if this question has been already resolved, I don't know wich keyword to use


I would like to replace this sentence by an icon :
Quote:
define('_CAPTCHA_REFRESH', 'Click to refresh the image if it is not clear enough.');

(www/language/english/captcha)


To do it, I must :

• 1. edit www/class/captcha/image.php, line 89

Replace :
$image .= "<br /><a href="javascriptxoops_captcha_refresh('" . ($this->config['name']) . "')">" _CAPTCHA_REFRESH "</a>";

By :
$image .= "<a href="javascriptxoops_captcha_refresh('" . ($this->config['name']) . "')" title="_CAPTCHA_REFRESH"><img class="captcha-reload" src="captcha-ico-refresh.gif"></a>";


• 2. put my icon into www/modules/xforms/
(it is the module I use)

Click to see original Image in a new window



Now, two questions :

a • title="_CAPTCHA_REFRESH" does not display sentence, _CAPTCHA_REFRESH appears when I roll hover the icon. Could you tell me the right syntax ?

b • <img class="captcha-reload" src="captcha-ico-refresh.gif"> : path is not very pratical, I would prefer something like <{xoAppUrl /uploads/captcha-refresh.gif}>... so the same icon could be used for all my modules. Again, could you tell me the right syntax ?


Thanks in advance for responses :)

Top


Still learning CSS and... english
Burning
Theme Designer
Theme Designer
Joined:
2006/8/22 14:44
Group:
Registered Users
Repository Group
Posts: 1111
(Show More) (Show Less)


#2 Posted on: 2010/9/29 7:57 Re: Improve default captcha - trouble with language define and path
$image .= '<a href="javascript: xoops_captcha_refresh("' . ($this->config['name']) . '")" title="' . _CAPTCHA_REFRESH . '"><img class="captcha-reload" src="' . XOOPS_URL . '"/uploads/captcha-ico-refresh.gif"></a>';

or


$image .= '<a href="javascript: xoops_captcha_refresh(\'' . ($this->config['name']) . '\')" title="' . _CAPTCHA_REFRESH . '"><img class="captcha-reload" src="' . XOOPS_URL . '"/uploads/captcha-ico-refresh.gif"></a>';

?


Top


Xoops User Utilities | Xoops Search Engine | vil3/trabisdementia
trabis
Core Developer
Core Developer
Joined:
2006/9/1 13:10
From Portugal
Group:
Webmaster
Registered Users
Posts: 2198
(Show More) (Show Less)


#3 Posted on: 2010/9/29 8:08 Re: Improve default captcha - trouble with language define and path
Many thanks !!

Both codes work, just a little " to delete before /uploads:
$image .= '<a href="javascript: xoops_captcha_refresh('' . ($this->config['name']) . '')" title="' _CAPTCHA_REFRESH '"><img class="captcha-reload" src="' XOOPS_URL '/uploads/captcha-ico-refresh.gif"></a>';


Now sentence is displayed properly and refresh icon at the right place


Edit : oups! first Trabis code does not work, refresh feature is broken

Top


Still learning CSS and... english
Burning
Theme Designer
Theme Designer
Joined:
2006/8/22 14:44
Group:
Registered Users
Repository Group
Posts: 1111
(Show More) (Show Less)







You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You can vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.

[Advanced Search]