Fork me on GitHub

Search

Donat-O-Meter

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

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 3.0 4 6 2013 Abuse Android AntiHarvesting AntiMalUser AntiSpam API Apple Battlefield Bootstrap By Captcha cell cent chronolabs CHUNG content CĂN demo Digitally docek download Dresses evden eve facebook Fat Food for free Gateway Google Guide herre Honeypot HP Human HỘ IP iPhone jQuery Law Legal List Loss mobile module modules Monster new newbb news NHÀ online PARK Payment phone PHP Prevention profile project Protector publisher RESIDENCE responsive review Rights rmcommon Room security Sentry Signatures Signed site Smartphone Solution Spam Studio tags tdmcreate The Theme themes User userlog web weight Wishcraft xoops Xortify XPayment

New Users

Registering user

# 137911

mydarkglobe

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)

Resized Image



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
Joined:
2006/8/22 14:44
Group:
Registered Users
Repository Group
Posts: 1109
(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
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
Joined:
2006/8/22 14:44
Group:
Registered Users
Repository Group
Posts: 1109
(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.
You cannot create pdf.
You cannot get print page.

[Advanced Search]