![Show/hide content [x]](themes/dragonfly/images/minus.png) Navigation
Home Community News Search Projekte
![Show/hide content [x]](themes/dragonfly/images/minus.png) Languages
![Show/hide content [x]](themes/dragonfly/images/minus.png) Design
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.
|
java script in News und Encyclopedia Mod
|
View previous topic :: View next topic |
| Author |
Message |
LisaS Investigator


Offline Joined: Nov 19, 2004 Posts: 20 Location: BGL
|
Posted: 28.12.2004 15:22 Post subject: java script in News und Encyclopedia Mod |
|
Ich möchte in die News- und Encyclopedia-Module javascript einbauen,
wie z.B. popup Fenster bei Klick auf Thumbnail.
Im News-Mod von phpNuke funktionierte mein verwendetes JS noch -
im CPG modifizierten News-Mod funktionierts nicht mehr.
(Bin auch noch auf der Suche, ob ich das Problem in php lösen kann....)
_________________ Nobody is Perfect. Wenn Ihr Nobody trefft, grüsst ihn von mir.
LisaS please enter your server specs in your user profile!
|
|
| Back to top |
|
 |
Ertan Webmaster


Offline Joined: Mar 19, 2004 Posts: 1264 Location: Germany
|
|
| Back to top |
|
 |
LisaS Investigator


Offline Joined: Nov 19, 2004 Posts: 20 Location: BGL
|
Posted: 05.01.2005 14:20 Post subject: Re: java script in News und Encyclopedia Mod |
|
aah...  hatte mir schon nen Wolf gesucht.
bin ja noch Newbie in Sachen php programmieren - eh klar funktioniert das nich sooo einfach... 
Da fehlt sicher noch was...?!
Hab das folgende Script in die includes/javascript.php eingebaut.
Array:
echo "<script type=\"text/javascript\">\n";
echo "<!--\n";
echo " function Zoom(imgName,imgWidth,imgHeight) {\n";
echo " zoomWindow = window.open('', 'zoomWin', 'width='+imgWidth+',height='+imgHeight+'top=10,left=5,toolbar=0,menubar=0,location=0,scrollbars=0')
zoomWindow.document.write(\"<html><head><title>Loading Image, Please Wait...<\/title><\/head><body background='/images/zoombg.gif' leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 text='\",imgWidth,imgHeight,\"'><center><a href='#' onClick =javascript:window.close()><img src='\",imgName,\"' alt='Click to Close' border='0'><\/a><\/center><\/body><\/html>\")
zoomWindow.focus()
zoomWindow.window.resizeTo(imgWidth+8, imgHeight+29);
zoomWindow.document.title = \" NEWS \")\n";
echo "}\n";
echo "//-->\n";
echo "</SCRIPT>\n\n";
}
Sorry, Demolink geht im Moment noch nicht, da PW geschützt.
Sobald die Seiten online sind, stell ich sie mal vor.
_________________ Nobody is Perfect. Wenn Ihr Nobody trefft, grüsst ihn von mir.
LisaS please enter your server specs in your user profile!
|
|
| Back to top |
|
 |
Ertan Webmaster


Offline Joined: Mar 19, 2004 Posts: 1264 Location: Germany
|
Posted: 05.01.2005 20:22 Post subject: Re: java script in News und Encyclopedia Mod |
|
wie ist original javascript ?;-)
_________________ .: USE THE FORCE :.
Helft mit ! Keine Unbeantworteten Beiträge mehr
Ertan's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
|
|
| Back to top |
|
 |
LisaS Investigator


Offline Joined: Nov 19, 2004 Posts: 20 Location: BGL
|
Posted: 06.01.2005 12:43 Post subject: Re: java script in News und Encyclopedia Mod |
|
hmm... das komplette script sieht eigentlich so aus:
Array:
<script language="JavaScript">
<!--
// convert all characters to lowercase to simplify testing
var agt=navigator.userAgent.toLowerCase();
// *** BROWSER VERSION ***
// Note: On IE5, these return 4, so use is_ie5up to detect IE5.
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
// Note: Opera and WebTV spoof Navigator. We do strict client detection.
// If you want to allow spoofing, take out the tests for opera and webtv.
var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
&& (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
&& (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_nav4 = (is_nav && (is_major == 4));
var is_nav4up = (is_nav && (is_major >= 4));
var is_navonly = (is_nav && ((agt.indexOf(";nav") != -1) ||
(agt.indexOf("; nav") != -1)) );
var is_nav6 = (is_nav && (is_major == 5));
var is_nav6up = (is_nav && (is_major >= 5));
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie3 = (is_ie && (is_major < 4));
var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
var is_ie4up = (is_ie && (is_major >= 4));
var is_ie5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
var is_ie5_5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
var is_ie5up = (is_ie && !is_ie3 && !is_ie4);
var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
var is_ie6 = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
var is_ie6up = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);
// *** PLATFORM ***
var is_win = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
var is_mac = (agt.indexOf("mac")!=-1);
function EditPageOnLoad() {
// if ( document.forms.length == 0 ) return;
// formfields.Add(new validatedfield(form1.FirstName, 's', 'First Name', true));
}
function namosw_goto_byselect(sel, targetstr)
{
var index = sel.selectedIndex;
if (sel.options[index].value != '') {
if (targetstr == 'blank') {
window.open(sel.options[index].value, 'win1');
} else {
var frameobj;
if (targetstr == '') targetstr = 'self';
if ((frameobj = eval(targetstr)) != null)
frameobj.location = sel.options[index].value;
}
}
}
function Zoom(imgName,imgWidth,imgHeight) {
zoomWindow = window.open('', 'zoomWin', 'width='+imgWidth+',height='+imgHeight+'top=10,left=5,toolbar=0,menubar=0,location=0,scrollbars=0')
zoomWindow.document.write("<html><head><title>Loading Image, Please Wait...<\/title><\/head><body background='/images/zoombg.gif' leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 text='",imgWidth,imgHeight,"'><center><a href='#' onClick =javascript:window.close()><img src='",imgName,"' alt='Click to Close' border='0'><\/a><\/center><\/body><\/html>")
zoomWindow.focus()
zoomWindow.window.resizeTo(imgWidth+8, imgHeight+29);
zoomWindow.document.title = " NEWS "
}
// -->
<!--
if (document.layers) {
origWidth = innerWidth;
origHeight = innerHeight;
}
function reloadPage() {
if (innerWidth != origWidth || innerHeight != origHeight)
location.reload();
}
if (document.layers) onresize = reloadPage;
// -->
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}}
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',noresize'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
//-->
<!-- hide from JavaScript-challenged browsers
function openRadio(filename) {
popupWin = window.open(filename, 'f', 'status=no,resizable=no,width=410,height=230,scrollbars=no')
}
// done hiding -->
</script>
<script>
var a = Math.random();
var zzzzadslotzzzz= a * 100000;
</script>
Ich dachte, dass die PopUp Fenster Funktion im function Zoom(imgName,imgWidth,imgHeight)-Teil des Scripts passiert,
da die Links im Dokument so aussehen: <a href="javascript:Zoom('xy/xy/xy.jpg',640,480)"><img src="...."></a>
Oder lieg ich da auch falsch?!
_________________ Nobody is Perfect. Wenn Ihr Nobody trefft, grüsst ihn von mir.
LisaS please enter your server specs in your user profile!
|
|
| Back to top |
|
 |
Ertan Webmaster


Offline Joined: Mar 19, 2004 Posts: 1264 Location: Germany
|
Posted: 06.01.2005 13:28 Post subject: Re: java script in News und Encyclopedia Mod |
|
habe es hier mal zum testen eingebaut:
[url]
<a href="javascript:Zoom('http://www.cpgnuke.de/data4u/uploads/images.jpg',640,480)"><img width="45" vspace="0" hspace="0" border="0" src="http://www.cpgnuke.de/data4u/uploads/images.jpg" alt="Bezirke.gif" /></a>[/url]
in includes/javascript.php/ ganz unten nach ?> einfügen :
Array:
<script language="JavaScript">
function Zoom(imgName,imgWidth,imgHeight) {
zoomWindow = window.open('', 'zoomWin', 'width='+imgWidth+',height='+imgHeight+'top=10,left=5,toolbar=0,menubar=0,location=0,scrollbars=0')
zoomWindow.document.write("<html><head><title>Loading Image, Please Wait...<\/title><\/head><body background='/images/zoombg.gif' leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 text='",imgWidth,imgHeight,"'><center><a href='#' onClick =javascript:window.close()><img src='",imgName,"' alt='Click to Close' border='0'><\/a><\/center><\/body><\/html>")
zoomWindow.focus()
zoomWindow.window.resizeTo(imgWidth+8, imgHeight+29);
zoomWindow.document.title = " NEWS "
}
</script>
_________________ .: USE THE FORCE :.
Helft mit ! Keine Unbeantworteten Beiträge mehr
Ertan's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
|
|
| Back to top |
|
 |
LisaS Investigator


Offline Joined: Nov 19, 2004 Posts: 20 Location: BGL
|
Posted: 06.01.2005 13:41 Post subject: Re: java script in News und Encyclopedia Mod |
|
Juuuhuuuu! Es funktioniert!
:elefant:
@Ertan: Fettes Dankeschön!!!
_________________ Nobody is Perfect. Wenn Ihr Nobody trefft, grüsst ihn von mir.
LisaS please enter your server specs in your user profile!
|
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|