Overall_Headerda Rastgele Resim

Eklentiler ile ilgili gelişmeler. Yeni modlar, güncellemeler.

Overall_Headerda Rastgele Resim

İleti CeNK 08.05.2006, 23:03

[syntax="php"]##############################################################
## MOD Title: Random Picture in header
## MOD Author: Steven A <bno2000@hotmail.com >
## MOD Description: Add a random picture in the header
## MOD Version: 1.04
## Installation Level: Easy
## Installation Time: 2 minutes
## Files to Edit: templates/xxx/overall_header.tpl
## Included Files: n/a
########################################################
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above
##############################################################
## Author Notes:
## Add a random picture on every page. This mod was made in conjunction with subSilver.
##
## You must change the number in "imgCt = 1" if you have a different amount of images
##
## When this is done, create a folder in php-root/images and name it random.
## Then add the pictures in here, numbering them from 1.gif to whatever you like
##
## DEMO:http://members.lycos.co.uk/theshadowgelert/phpBB2/
## (random smilie)
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
templates/xxx/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
</head>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<SCRIPT><!-- Hide script from older browsers

imgCt = 1

function choosePic() {
if (document.images) {
thisImg = Math.floor((Math.random() * imgCt)) + 1
document.randomImg.src = "images/random/" + thisImg + ".gif"
}
}

// stop hiding script -->
</SCRIPT>
#
#-----[ FIND ]------------------------------------------
#
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}" />
#
#-----[ REPLACE WITH ]------------------------------------------
#
<body onLoad="choosePic()" bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}" />
#
#-----[ FIND ]------------------------------------------
#
</table></td>
</tr>
</table>

<br />
#
#-----[ AFTER, ADD ]------------------------------------------
#
<span class="gensmall">Random smilie: <IMG SRC="images/random/1.gif" NAME="randomImg"></span>
#
#-----[ SAVE/CLOSE ALL FILES ]----------------------------------------
#
# EoM

[/syntax]
Kullanıcı avatarı
CeNK
Üye
Üye
 
İleti: 584
Kayıt: 01.11.2005, 15:21
Konum: İstanbul

İleti umit06umit 08.05.2006, 23:38

tesekkürler arkadasım biraz acıklarmısın mesela ben adları

aa, bb , cc olan üç resmi images dosyasına yükedikten sonra

kenmdi değişecekmi resim dosyalarının adını nereye yazacam
biraz bilgi verirmisin?
umit06umit
Üye
Üye
 
İleti: 100
Kayıt: 03.02.2006, 20:38

İleti mgazi 08.05.2006, 23:43

Kodlardan anladığım kadarıyla images/random klasörü içinde bulunan gif uzantılı resimleri bu kodlar kendiliğinden gösteriyor yani resimlerin adlarını yazmana gerek yok.Ama .gif olanlar sadece.Eğer .jpg uzantılı veya daha farklı uzantılı resimleri göstermek istiyorsan,

document.randomImg.src = "images/random/" + thisImg + ".gif"

satırındaki .gif uzantısını istediğin uzantı ile değiştirirsin.
Kullanıcı avatarı
mgazi
Üye
Üye
 
İleti: 124
Kayıt: 10.11.2005, 17:09
Konum: Kayseri

İleti umit06umit 08.05.2006, 23:48

tesekkürler deneyeyim
umit06umit
Üye
Üye
 
İleti: 100
Kayıt: 03.02.2006, 20:38

İleti mymydreamer 08.05.2006, 23:59

<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}" />


bu kod

ve

</table></td>
</tr>
</table>

<br />


bu kod overall_header dosyasında yok yani ben bulamadım
mymydreamer
Üye
Üye
 
İleti: 5
Kayıt: 05.03.2006, 21:24

İleti umit06umit 09.05.2006, 00:01

evet bu kodları bende bulamadım
umit06umit
Üye
Üye
 
İleti: 100
Kayıt: 03.02.2006, 20:38

Cvp: Overall_Headerda Rastgele Resim

İleti CeNK 09.05.2006, 00:20

bu modu hiç kullanmadım sadece elimde bulunduğu için attım buraya ve istek linkine karşılık olarak yaptım bunu

1.ci kodu
[syntax="php"]<body bgcolor="{T_BODY_BGCOLOR}"[/syntax]

kodunu arattırın.


2.ci kod içinse
temada bulamadıysanız birde
Bu koddan sonra deneyin
ovreall headerın en sonundaki
[syntax="php"]</tr>
</table>[/syntax]

den sonraya ekleyin
Kullanıcı avatarı
CeNK
Üye
Üye
 
İleti: 584
Kayıt: 01.11.2005, 15:21
Konum: İstanbul

İleti umit06umit 09.05.2006, 08:16

<body bgcolor="{T_BODY_BGCOLOR}"

bu yine yok arkadasım biraz yoruyoruz ama
umit06umit
Üye
Üye
 
İleti: 100
Kayıt: 03.02.2006, 20:38

İleti CeNK 09.05.2006, 09:04

{T_BODY_TEXT}
{T_BODY_LINK}
{T_BODY_VLINK}

diyerek arattırın o satırda en benzer kodları olanları bulmanız gerekiyor benzer temalarda
Kullanıcı avatarı
CeNK
Üye
Üye
 
İleti: 584
Kayıt: 01.11.2005, 15:21
Konum: İstanbul

İleti umit06umit 09.05.2006, 16:20

arkadasım buyur senin dediğin hiçbir sey yok bu dosyada head tagından baska?



<?xml version="1.0" encoding="{S_CONTENT_ENCODING}"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="Content-Style-Type" content="text/css" />
{META}
{NAV_LINKS}
<title>{SITENAME} :: {PAGE_TITLE}</title>
<!-- BEGIN switch_user_logged_out -->
<link rel="stylesheet" href="templates/fisubice/cbackinfo.css" type="text/css">
<!-- END switch_user_logged_out -->

<link rel="stylesheet" href="templates/fisubsilversh/{T_HEAD_STYLESHEET}" type="text/css" />
<script language="JavaScript" type="text/javascript" src="includes/toggle_display.js"></script>
<script language="JavaScript1.2">

var clickmessage="Komiksir Resim Kopyalama Yasağı !"

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()
</script>
<!-- BEGIN switch_enable_pm_popup -->
<script type="text/javascript">
<!--
if ( {PRIVATE_MESSAGE_NEW_FLAG} )
{
window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
}
//-->
</script>
<!-- END switch_enable_pm_popup -->
<style type="text/css">

#topbar{
position:absolute;
border: 1px solid black;
padding: 2px;
background-color: #CCCCCC;
width: 620px;
visibility: hidden;
z-index: 100;
left: 181px;
top: 8px;
}
.Stil2 {color: #000000}
</style>

<script type="text/javascript">

var persistclose=0
var startX = 250
var startY = 30
var verticalpos="fromtop"

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function closebar(){
if (persistclose)
document.cookie="remainclosed=1"
document.getElementById("topbar").style.visibility="hidden"
}

function staticbar(){
barheight=document.getElementById("topbar").offsetHeight
var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
var d = document;
function ml(id){
var el=d.getElementById(id);
if (!persistclose || persistclose && get_cookie("remainclosed")=="")
el.style.visibility="visible"
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};
el.x = startX;
if (verticalpos=="fromtop")
el.y = startY;
else{
el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
el.y -= startY;
}
return el;
}
window.stayTopLeft=function(){
if (verticalpos=="fromtop"){
var pY = ns ? pageYOffset : iecompattest().scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
}
else{
var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;
ftlObj.y += (pY - startY - ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 10);
}
ftlObj = ml("topbar");
stayTopLeft();
}

if (window.addEventListener)
window.addEventListener("load", staticbar, false)
else if (window.attachEvent)
window.attachEvent("onload", staticbar)
else if (document.getElementById)
window.onload=staticbar
</script>

<script language="Javascript" type="text/javascript">
<!--
function setCheckboxes(theForm, elementName, isChecked)
{
var chkboxes = document.forms[theForm].elements[elementName];
var count = chkboxes.length;

if (count)
{
for (var i = 0; i < count; i++)
{
chkboxes[i].checked = isChecked;
}
}
else
{
chkboxes.checked = isChecked;
}

return true;
}
//-->
</script>
<!-- Start add - Birthday MOD -->
{GREETING_POPUP}
<!-- End add - Birthday MOD -->
<script type="text/javascript">
<!--
window.status = "{PRIVATE_MESSAGE_INFO}";
// -->
</script>
<!-- Start add - Protect user account MOD -->
{PASSWD_POPUP}
<!-- End add - Protect user account MOD -->
<!-- BEGIN switch_absence -->
<script language="Javascript" type="text/javascript">
<!--
window.open('{U_ABSENCE_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
//-->
</script>
<!-- END switch_absence -->
</head>
<body>
<!-- BEGIN switch_user_logged_out -->
<!-- InfoBar MOD by http://www.cback.de -->
<div id="info"><div id="infobar"><a href="{U_REGISTER}">{L_CBACK_INFOBAR}</a></div></div>
<br>
<!-- END switch_user_logged_out -->
<!-- Start add - Complete banner MOD -->
<!-- Banners -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div align="center">{BANNER_1_IMG}</div></td></tr>
<tr><td><div align="center">{BANNER_2_IMG}</div></td></tr>
</table>
</td>
<td width="60%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div align="center">{BANNER_3_IMG}</div></td></tr>
<tr><td><div align="center">{BANNER_4_IMG}</div></td></tr>
</table>
</td>
<td width="20%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div align="center">{BANNER_5_IMG}</div></td></tr>
<tr><td><div align="center">{BANNER_6_IMG}</div></td></tr>
</table>
</td>
</tr>
</table>
<!-- End Banners -->
<!-- End add - Complete banner MOD -->
<a name="top" id="top"></a>
<table class="bodyline" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<table class="topbkg" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td><a href="{U_INDEX}"><img src="templates/fisubsilversh/images/phpbb2_logo.jpg" border="0" alt="{L_INDEX}" title="{L_INDEX}" width="240" height="110" /></a></td>
<td align="center" width="100%">{BANNER_0_IMG}</td><td><a href="{U_PORTAL}"><img src="templates/fisubsilversh/images/phpbb2_logor.jpg" border="0" alt="{L_HOME}" title="{L_HOME}" width="140" height="110" /></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="center" class="topnav">&nbsp;<a href="{U_FAQ}">{L_FAQ}</a>
&nbsp;•&nbsp;
<a href="{U_SEARCH}">{L_SEARCH}</a>
&nbsp;•&nbsp;
<a href="{U_PREFERENCES}">{L_PREFERENCES}</a>
<!-- BEGIN switch_user_logged_in -->
&nbsp;•&nbsp;
<a href="{U_BOOKMARKS}">{L_BOOKMARKS}</a>
&nbsp; •&nbsp;
<a href="{U_SEARCH_NEW}">{L_SEARCH_NEW2}</a>
<!-- END switch_user_logged_in -->
&nbsp;•&nbsp;
<a href="{U_GROUP_CP}">{L_USERGROUPS}</a>
<!-- BEGIN switch_user_logged_out -->
<div id="topbar">
<a href="" onClick="closebar(); return false"></a>
<table width="100%" border="0" class="menu22">
<tr>
<td width="72%">&nbsp;<span class="Stil2">Merhaba Misafir Sitemize Hosgeldiniz,</span></td>
<td width="50%"><a href="{U_LOGIN_LOGOUT}" class="genmed">{L_LOGIN_LOGOUT}</a></td>
<td width="45%" height="29"><a href="register.php"></a>
<a href="{U_REGISTER}" class="genmed">{L_REGISTER}</a></td>
<td width="3%"><div align="right"><a href="" onClick="closebar(); return false"><img src="images/a_close.gif" width="23" height="23" border="0" /></a></div></td>
</tr>
</table>
</div>
<!-- END switch_user_logged_out -->
&nbsp;•&nbsp;
<a href="{U_PROFILE}">{L_PROFILE}</a>
&nbsp;•&nbsp;
<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>
&nbsp;•&nbsp;
<a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
{CALENDAR_BOX}
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td>
umit06umit
Üye
Üye
 
İleti: 100
Kayıt: 03.02.2006, 20:38

Cvp: Overall_Headerda Rastgele Resim

İleti deep_turtle 10.05.2006, 01:41

bunu normal html için uygulayamazmıyız bi bakrmısınız denedim ben ama olmadı kodları burda sizce nerde yanlış yaptım
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
[syntax="html"]<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<SCRIPT><!-- Hide script from older browsers

imgCt = 1

function choosePic() {
if (document.images) {
thisImg = Math.floor((Math.random() * imgCt)) + 1
document.randomImg.src = "images/random/" + thisImg + ".jpg"
}
}

// stop hiding script -->
</SCRIPT>
<body onLoad="choosePic()">

<span class="gensmall">Random smilie: <IMG SRC="images/random/1.jpg" NAME="randomImg"></span>
</body>
</html>[/syntax]
Kullanıcı avatarı
deep_turtle
Üye
Üye
 
İleti: 188
Kayıt: 19.01.2006, 18:30


Duyurular & Güncellemeler



Kimler çevrimiçi

Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 0 misafir

cron