4images resim galerisi kullanıcalarına bir anlatım daha yine DilnüvaZ farkı ile :
Bu konumuzda anlatılanlar sayesınde sitenizdeki resimlerin diğer sitelerde yayınlanmasını sağlamakla kalmayıp hitinize hit katacaksınız buyrun ozaman kolay gelsin :
Öncelikle bu dosyalarının bir yedeğini alın nolur nolmaz değilmi belki de kurt kapar :p
üzerinde çalışacağımız dosyalar :
templates/kendi temanız/header.html
templates/kendi temanız/details.html
details.php
member.php
Haydi Bismillah....
Öncelikle templates/kendi temanız/header.html da </head>dan once bunu kodu ekleyin: <script type="text/javascript">
function highlight(field) {
field.focus();
field.select();
}
</script>
2:
templates/kendi temanız/details.html de <table width="100%" border="0" cellspacing="0" cellpadding="1">
ile
<tr>
<td class="bordercolor">
arasına
<td class="row2">{image_codes}
ekleyin bunu dilediğiniz yere yapabilirsiniz ama kendim buraya yaptım.
3:
details.php yi açın bu kodu bulun :
$site_template->print_template($site_template->parse_template($main_template));
bundan öncesine :
//-----------------------------------------------------
//--- ImageCodes v1.0 Begins --------------------------
//-----------------------------------------------------
// Mod: ImageCodes v1.0
// Version: 1.0
// Description : Get image path, link and bbcode on the details page
// Contact: arjoon@gmail.com
// Last update: June 30 2007
$sql = "SELECT image_media_file FROM ".IMAGES_TABLE." WHERE image_id= $image_id";
$image_codes = $site_db->query_firstrow($sql);
$new_name = $image_codes['image_media_file'];
$uploaded_image_path = $script_url."/".MEDIA_DIR."/".$cat_id."/".$new_name;
$uploaded_thumb_path = $script_url."/".THUMB_DIR."/".$cat_id."/".$new_name;
$uploaded_image_link = $script_url."/details.php?image_id=".$image_id;
$uploaded_thumb_hotlink = "<a href=\"".$uploaded_image_link."\"><img src=\"".$uploaded_thumb_path."\" border=\"0\" alt=\"".$new_name."\"></a>";
$uploaded_image_hotlink = "<a href=\"".$script_url."\"><img src=\"".$uploaded_image_path."\" border=\"0\" alt=\"".$new_name."\"></a>";
$uploaded_image_bbcode = "[URL="http://.$script_url."][IMG]".$uploaded_image_path."[/IMG][/URL]";
$uploaded_thumb_bbcode = "[URL="http://.$uploaded_image_link."][IMG]".$uploaded_thumb_path."[/IMG][/URL]";
$uploadinfo .= "<font size='2' face='Tahoma'><b>Bu Resmi:</b><br />";
$uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_thumb_hotlink."' type='text' name='image'>Web Siteleri İçin Ufak Boyut <br />";
$uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_thumb_bbcode."' type='text' name='image'>Forumlar İçin Ufak Boyut<br /><br />";
$uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_image_hotlink."' type='text' name='image'>Web Siteleri çin :<br />";
$uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_image_bbcode."' type='text' name='image'>Forumlar İçin:<br /><br />";
$uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_image_path."' type='text' name='image'>Direk Resim Adresi<br /><br /></font>";
$icodes .= "<table border=\"0\" width=\"500px\" align=\"center\">\n<tr>\n<td>\n".$uploadinfo."\n</td>\n</tr>\n</table>\n";
$site_template->register_vars("image_codes", $icodes);
//-----------------------------------------------------
//--- end of ImageCodes v1.0 --------------------------
//-----------------------------------------------------
ekleyin
4 :
Son olarak member.php yi açın ve bu kodu bulun :
$content .= "<table border=\"0\" align=\"center\">\n<tr>\n<td>\n".$media."\n</td>\n</tr>\n</table>\n";
ve bu kod ile değişin :
//-----------------------------------------------------
//--- ImageCodes v1.0 Begins --------------------------
//-----------------------------------------------------
// Mod: ImageCodes v1.0
// Version: 1.0
// Description : Get image path, link and bbcode on the details page
// Contact: arjoon@gmail.com
// Last update: June 30 2007
$sql = "SELECT image_media_file FROM ".IMAGES_TABLE." WHERE image_id= $image_id";
$image_codes = $site_db->query_firstrow($sql);
$new_name = $image_codes['image_media_file'];
$uploaded_image_path = $script_url."/".MEDIA_DIR."/".$cat_id."/".$new_name;
$uploaded_thumb_path = $script_url."/".THUMB_DIR."/".$cat_id."/".$new_name;
$uploaded_image_link = $script_url."/details.php?image_id=".$image_id;
$uploaded_thumb_hotlink = "<a href=\"".$uploaded_image_link."\"><img src=\"".$uploaded_thumb_path."\" border=\"0\" alt=\"".$new_name."\"></a>";
$uploaded_image_hotlink = "<a href=\"".$script_url."\"><img src=\"".$uploaded_image_path."\" border=\"0\" alt=\"".$new_name."\"></a>";
$uploaded_image_bbcode = "[URL="http://.$script_url."][IMG]".$uploaded_image_path."[/IMG][/URL]";
$uploaded_thumb_bbcode = "[URL="http://.$uploaded_image_link."][IMG]".$uploaded_thumb_path."[/IMG][/URL]";
$uploadinfo .= "<font size='2' face='Tahoma'><b>Bu Resmi:</b><br />";
$uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_thumb_hotlink."' type='text' name='image'>Web Siteleri İçin Ufak Boyut <br />";
$uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_thumb_bbcode."' type='text' name='image'>Forumlar İçin Ufak Boyut<br /><br />";
$uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_image_hotlink."' type='text' name='image'>Web Siteleri çin :<br />";
$uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_image_bbcode."' type='text' name='image'>Forumlar İçin:<br /><br />";
$uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_image_path."' type='text' name='image'>Direk Resim Adresi<br /><br /></font>";
$icodes .= "<table border=\"0\" width=\"500px\" align=\"center\">\n<tr>\n<td>\n".$uploadinfo."\n</td>\n</tr>\n</table>\n";
$site_template->register_vars("image_codes", $icodes);
//-----------------------------------------------------
//--- end of ImageCodes v1.0 --------------------------
//-----------------------------------------------------
sonuç boyle çıkacaktır....
DilnüvaZ Forumoy.Net yazısı çıkmaz merak etmeyin o yazı bu resme ait
Buyrunorginal post:
http://www.4homepages.de/forum/index.php?topic=17912.0DilnüvaZ