[dev] Comfot URL Query based on JS

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Post Reply
mgutt
Registered User
Posts: 346
Joined: Tue Sep 21, 2004 2:54 pm
Location: Germany, Sankt Augustin
Contact:

[dev] Comfot URL Query based on JS

Post by mgutt » Thu Dec 16, 2004 4:01 pm

Code: Select all

############################################################## 
## Mod Title:      URL Query (BBcode) 
## Mod Author:      oxpus http://www.oxpus.de edit by mgutt http://www.maxrev.de 
## Mod Description:   a little comfort URL Query based on Javascript 
## Mod Version:      1.0.0 
## 
## Installation Level:   Easy 
## Installation Time:   5 Minutes 
## Files To Edit:   templates/subSilver/posting_body.tpl 
##          language/lang_english/lang_main.php 
##          language/lang_german/lang_main.php 
##          posting.php 
##          privmsg.php 
## 
## Included Files:   n/a 
############################################################## 
## Before Adding This Mod To Your Forum, You Should Back Up All Files Related To This Mod 
############################################################## 
# 
#-----[ OPEN ]----- 
# 
templates/subSilver/posting_body.tpl 

# 
#-----[ FIND ]----- 
# 
// Shows the help messages in the helpline window 
function helpline(help) { 
   document.post.helpbox.value = eval(help + "_help"); 
} 

# 
#-----[ AFTER, ADD ]----- 
# 
function BBCurl() { 
   var FoundErrors = ''; 
   var enterURL   = prompt("{L_BBCURL_URL}", "http://"); 
   var enterTITLE = prompt("{L_BBCURL_NAME}", "{L_BBCURL_DESC}"); 
   if (!enterURL)    { 
      FoundErrors += "{L_BBCURL_NO_URL}"; 
   } 
   if (!enterTITLE)  { 
      FoundErrors += "{L_BBCURL_NO_NAME}"; 
   } 
   if (FoundErrors)  { 
      alert("Error"+FoundErrors); 
      return; 
   } 
   var ToAdd = "[URL="+enterURL+"]"+enterTITLE+"[/URL]"; 
   document.post.message.value+=ToAdd; 
   document.post.message.focus(); 
} 

# 
#-----[ FIND ]----- 
# 
<td> 
<input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="width: 52px" onclick="bbstyle(16)" onmouseover="helpline('w')" /> 
</td> 

# 
#-----[ REPLACE WITH ]----- 
# 
<td> 
<input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="width: 52px" onClick="BBCurl()" onMouseOver="helpline('w')" /> 
</td> 

# 
#-----[ OPEN ]----- 
# 
language/lang_english/lang_main.php 

# 
#-----[ FIND ]----- 
# 
$lang['bbcode_f_help'] = 'Font size: [size=x-small]small text[/size]'; 

# 
#-----[ AFTER, ADD ]----- 
# 
// URL Query by www.oxpus.de edit by www.maxrev.de 
$lang['bbcurl_url'] = 'What is the URL?'; 
$lang['bbcurl_name'] = 'Please add the Name of the URL.'; 
$lang['bbcurl_desc'] = 'Description'; 
$lang['bbcurl_no_url'] = 'You did not add a URL!'; 
$lang['bbcurl_no_name'] = 'You did not add a name!'; 

# 
#-----[ OPEN ]----- 
# 
language/lang_german/lang_main.php 

# 
#-----[ FIND ]----- 
# 
$lang['bbcode_f_help'] = 'Font size: [size=x-small]small text[/size]'; 

# 
#-----[ AFTER, ADD ]----- 
# 
// URL Query by www.oxpus.de edit by www.maxrev.de 
$lang['bbcurl_url'] = 'Wie lautet die Internetadresse (URL)?'; 
$lang['bbcurl_name'] = 'Gebe jetzt den Namen für die Internetadresse (URL) ein.'; 
$lang['bbcurl_desc'] = 'Beschreibung'; 
$lang['bbcurl_no_url'] = 'Du hast keine Internetadresse (URL) angegeben!'; 
$lang['bbcurl_no_name'] = 'Du hast keinen Namen für die Internetadresse (URL) angegeben!'; 

# 
#-----[ OPEN ]----- 
# 
posting.php 

# 
#-----[ FIND ]----- 
# 
   'L_EMPTY_MESSAGE' => $lang['Empty_message'], 

# 
#-----[ AFTER, ADD ]----- 
# 
   // URL Query by www.oxpus.de edit by www.maxrev.de 
   'L_BBCURL_URL' => $lang['bbcurl_url'], 
   'L_BBCURL_NAME' => $lang['bbcurl_name'], 
   'L_BBCURL_DESC' => $lang['bbcurl_desc'], 
   'L_BBCURL_NO_URL' => $lang['bbcurl_no_url'], 
   'L_BBCURL_NO_NAME' => $lang['bbcurl_no_name'], 
# 
#-----[ OPEN ]----- 
# 
privmsg.php 

# 
#-----[ FIND ]----- 
# 
      'L_EMPTY_MESSAGE' => $lang['Empty_message'], 

# 
#-----[ AFTER, ADD ]----- 
# 
      // URL Query by www.oxpus.de edit by www.maxrev.de 
      'L_BBCURL_URL' => $lang['bbcurl_url'], 
      'L_BBCURL_NAME' => $lang['bbcurl_name'], 
      'L_BBCURL_DESC' => $lang['bbcurl_desc'], 
      'L_BBCURL_NO_URL' => $lang['bbcurl_no_url'], 
      'L_BBCURL_NO_NAME' => $lang['bbcurl_no_name'], 

# 
#-----[ SAVE/CLOSE ALL FILES ]----- 
# 
# EoM
it started all here:

http://www.oxpus.de/phpBB/viewtopic.php?t=844
Forums: Honda || phpBB Categories Hierarchy
Mods: Spamfilter against bot registrations || Seo Urls

addso
Registered User
Posts: 71
Joined: Tue Nov 30, 2004 1:00 am

Post by addso » Thu Dec 16, 2004 7:58 pm

what does this mod do?!

Shof515
Registered User
Posts: 1169
Joined: Wed Mar 19, 2003 4:36 am

Post by Shof515 » Fri Dec 17, 2004 11:10 am

what did you edit to this mod?
Whos missing up my sig?

phantomk
Registered User
Posts: 1039
Joined: Wed Apr 14, 2004 5:32 am
Location: Canada Eh?
Name: Daniel Lee
Contact:

Post by phantomk » Fri Dec 17, 2004 12:53 pm

Looks to me its a javascript url popup. When you click on the bbcode a JS popup appears and you enter the url and name etc

mgutt
Registered User
Posts: 346
Joined: Tue Sep 21, 2004 2:54 pm
Location: Germany, Sankt Augustin
Contact:

Post by mgutt » Sun Dec 19, 2004 10:40 pm

yes thats right. a javascript based popup.
Forums: Honda || phpBB Categories Hierarchy
Mods: Spamfilter against bot registrations || Seo Urls

User avatar
smithy_dll
Former Team Member
Posts: 7630
Joined: Tue Jan 08, 2002 6:27 am
Location: Australia
Name: Lachlan Smith
Contact:

Post by smithy_dll » Mon Dec 20, 2004 4:21 am

please use the proper MOD Template and submit to the MOD DB,

this forum isn't for releases pre-se anymore now turnaround is under a week

Post Reply

Return to “[2.0.x] MODs in Development”