Seite 1 von 1

URL im Extra Fenster (popup)

Verfasst: 24.08.2006 08:57
von PhilHH
Hey..

Ich hab nie selber was an unserem Forum gemacht nur leider ist nette Mensch nicht mehr da der mir geholfen hat.

Wir haben immer wenn wir einen URL eingeben wollten ein Extra-Fenster bekommen. Dort hat er zuerst nach der URL und dann nach der Bezeichnung gefragt..

Wer kann mir helfen oder sagen wo ich dazu informationen finde...

Phil, dankt!

Verfasst: 24.08.2006 09:02
von gloriosa
Hallo,
hier das, relativ unbekannte, Snippet :

Code: Alles auswählen

##############################################################
## MOD Title: userfriendly URL-input while posting
## MOD Author: Tsjakkaa < tsjakkaa@lycos.nl > (N/A) N/A
## MOD Description: This MOD makes it easier for the user to add a link text while posting.
##                When inserting a [url]-tag, it will prompt for the URL and link text of the URL
##               The complete bbcode-tag will be added this to the message.
##               It's just to force gently to add a text when adding a link
##
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 3 Minutes
## Files To Edit:
##            posting.php
##            language/lang_english/lang_main.php
##            templates/subSilver/posting_body.tpl
##
## Included Files: n/a
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
##############################################################
## MOD History:
##
##   2005-01-05 - Version 0.1.0
##      - first (beta) release of this MOD
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

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

#
#-----[ FIND ]---------------------------------------------
# Line 1006
   'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],


#
#-----[ AFTER, ADD ]---------------------------------------------
#
   'L_BBCODE_URL_LOCATION' => $lang['bbcode_url_location'],
   'L_BBCODE_URL_TEXT' => $lang['bbcode_url_text'],

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

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


#
#-----[ AFTER, ADD ]---------------------------------------------
#
$lang['bbcode_url_location'] = 'Enter the URL';
$lang['bbcode_url_text'] = 'Enter link text';

#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/posting_body.tpl

#
#-----[ FIND ]---------------------------------------------
# Line 190
   } else { // Open tags


#
#-----[ AFTER, ADD ]---------------------------------------------
#
      if(bbnumber == 16){ // inserting a new URL-tag
         var URL = prompt('{L_BBCODE_URL_LOCATION}' , 'http://');
         if(URL && URL != 'http://'){
            var linktext = prompt('{L_BBCODE_URL_TEXT}' , URL.replace("http://", ""));
            if(linktext){
                txtarea.value += "[url=" + URL + "]" + linktext + bbtags[bbnumber+1];
             }
             else{
                txtarea.value += bbtags[bbnumber] + URL + bbtags[bbnumber+1];
             }
             txtarea.focus();
              return;
         }
         else{
            return;
         }

        }

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

Re: URL im Extra Fenster (popup)

Verfasst: 03.06.2009 22:36
von Diego2k
hi, schonmal vielen dank für die antwort. wäre ein anfang. ich bin mir da nicht immer so sicher wie schlau unsere user sind ;) ich würde manchmal mehr auf faul tippen als auf blöde ;)
ich hab noch einen mod gefunden der bestimmte eingaben automatisch in links abändert. das problem bei dem mod ist nur, dass man keine variablen in die links einbauen, so dass man theoretisch ALLE links einzelnd eintragen müsste... also keine alternative. der mod heißt "Autolinks For phpBB2 Mod"

wenn noch einer eine tolle idee zu dem problem hat wäre das natürlich super!!

grüße diego2k