6
Can you please add the following code in the next core then?
This will make it possible to use siteurl through the dhtmleditor opening links inside a website on the same page...
in class\xoopsform\formdhtmltextarea.php
insert after line 135:
"hand"' src='".XOOPS_URL."/images/siteurl.gif' alt='siteurl' onclick='xoopsCodeSiteUrl("".$ele_name."", "".htmlspecialchars(_ENTERURL, ENT_QUOTES)."", "".htmlspecialchars(_ENTERWEBTITLE, ENT_QUOTES)."");' /> ".
in include\xoops.js
insert after line 246:
function xoopsCodeSiteUrl(id, enterUrlPhrase, enterWebsitePhrase){
if (enterUrlPhrase == null) {
enterUrlPhrase = "Enter the URL of the link you want to add:";
}
var text = prompt(enterUrlPhrase, "");
var domobj = xoopsGetElementById(id);
if ( text != null && text != "" ) {
if (enterWebsitePhrase == null) {
enterWebsitePhrase = "Enter the web site title:";
}
var text2 = prompt(enterWebsitePhrase, "");
if ( text2 != null ) {
if ( text2 == "" ) {
var result = "[siteurl=" + text + "]" + text + "[/siteurl]";
} else {
var pos = text2.indexOf(unescape('%00'));
if(0 < pos){
text2 = text2.substr(0,pos);
}
var result = "[siteurl=" + text + "]" + text2 + "[/siteurl]";
}
xoopsInsertText(domobj, result);
}
}
domobj.focus();
}
upload
and
to images folder....
Now you can select in dhtm editor how links should be handled...
Editing is done based on XOOPS 2.0.18
Be smart, stay smart. Stay one step ahead...