Author Topic: [MOD]Resimlerinizin hitini öğrenin  (Read 8411 times)

0 Members and 1 Guest are viewing this topic.

Offline DilnüvaZ

  • Moderator
  • Hero Member
  • *****
  • Posts: 527
  • Gönül Okşayıcı
    • View Profile
    • Nuvanda Resimlere Dair Ne Varsa
[MOD]Resimlerinizin hitini öğrenin
« on: May 01, 2008, 08:51:05 AM »
Arkadaşlar admin panelınde resimlerinizin hepsının ayrı ayrı hıtını gormek ıstıyorsanız çok kolay :)
yeni bir text dosya çalıştırıcıda orneğın edıt plus gıbı de  image_visits.php dıye bır dosya yap içine şu kodları koy :
Code: [Select]
<?php // PLUGIN_TITLE: Image visits
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: image_visits.php                                     *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.4                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) fweitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

$nozip 1;
define('IN_CP'1);
define('ROOT_PATH'"./../../");
require(
ROOT_PATH.'admin/admin_global.php');

show_admin_header();

if (
$action == "") {
    
$action "show_image_visits";
}

if (
$action == "show_image_visits") {
    
    
$additional_sql "";    
    if (isset(
$additional_image_fields) && is_array($additional_image_fields) && !empty($additional_image_fields)) {
        foreach (
$additional_image_fields as $key => $val) {
            
$additional_sql .= ", " $key;            
        }
    }
    
    
$sql "
    
    SELECT image_id, image_name, image_date, image_hits" 
$additional_sql "
    FROM " 
IMAGES_TABLE "
    WHERE image_active = 1 AND (cat_id NOT IN ("
.get_auth_cat_sql("auth_viewimage""NOTIN").", ".get_auth_cat_sql("auth_viewcat""NOTIN")."))
    ORDER BY image_date, image_hits DESC
    
    "
;
    
    
$result $site_db->query($sql);
    
$num_rows $site_db->get_numrows($result);
    
?>

    <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td width="100%">
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td width="100%" align="center" class="tableheader" /><?php echo $lang['image_hits_stats']; ?></td>
    </tr>
    </table>
    <table border="0" width="100%" cellpadding="0" cellspacing="0">   
    </table>   
    <?php    
    
if (isset($num_rows) && $num_rows <= 0) {
        
?>

        <table border="0" width="100%" cellpadding="0" cellspacing="0" class="tablebottom" />   
        <tr>   
        <td width="100%" align="center" class="tablerow" /><br /><?php echo $lang['image_hits_no_content']; ?></td>
        </tr>
        </table>
        <?php          
    
} elseif (isset($num_rows) && $num_rows 0) {
        
        
$sql1 "SELECT COUNT(image_id) AS total_hits FROM " IMAGES_TABLE " WHERE image_active = 1 AND (cat_id NOT IN (".get_auth_cat_sql("auth_viewimage""NOTIN").", ".get_auth_cat_sql("auth_viewcat""NOTIN")."))";
        
$row $site_db->query_firstrow($sql1);
        
$total_hits = (isset($row['total_hits'])) ? $row['total_hits'] : 0;
        
?>

        <table border="0" width="100%" cellpadding="1" cellspacing="1" class="tablebottom" />   
        <tr>
        <td width="100%" align="center" class="tablerow" /><br /><?php echo $lang['image_hits_description']; ?> (Total: <b><?php echo $total_hits?></b>).<br /><br /></td>
        </tr>
        </table>
        <table border="0" width="100%" cellpadding="1" cellspacing="1" class="tablebottom" />   
        <tr>
        <td width="33%" align="center" class="tableheader" /><?php echo $lang['image_hits_image_name']; ?></td>
        <td width="33%" align="center" class="tableheader" /><?php echo $lang['image_hits_added_on']; ?></td>
        <td width="33%" align="center" class="tableheader" /><?php echo $lang['image_hits_title']; ?></td>
        </tr>
        <?php
        
while ($stats_row $site_db->fetch_array($result)) {
            
$image_id $stats_row['image_id'];
            
$image_name format_text(stripslashes($stats_row['image_name']), 2);
            
$image_date format_date($config['date_format'] . " " $config['format_time'], $stats_row['image_date']);
            
$image_hits $stats_row['image_hits'];
        
?>

        <tr>
        <td width="33%" align="center" class="tablerow" /><a href="<?php echo $site_sess->url(ROOT_PATH "details.php?image_id=" $image_id); ?>" class="link" target="_blank" /><?php echo $image_name?></a>
        <td width="33%" align="center" class="tablerow" /><?php echo $image_date?></td>
        <td width="33%" align="center" class="tablerow" /><?php echo $image_hits?></td>
        </tr>
        <?php
        
}                
    }
    
?>
   
    </table>
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td width="100%" align="center" class="tablerow" />&nbsp;</td>
    </tr>
    </table>
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td width="100%" align="center" class="tableheader" />&nbsp;</td>
    </tr>
    </table>
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td width="100%" align="center" class="tablerow" /><br /><span class="smalltext">Created by <a href="http://www.4homepages.de/forum/index.php?action=profile;u=20285" class="link" target="_blank" />Thunderstrike</a> . 2007-2008</span><br />
<span class="smalltext"><a href="http://www.4homepages.de/forum/index.php?topic=18685" class="link" target="_blank" />Support topic</a> .</span><br />
<br /></td>
    </tr>
    </table>
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td width="100%" align="center" class="tableheader" />&nbsp;</td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    <?php              


show_admin_footer(); 
?>

bo dosyayı admin/plugins in içine atın
2 :
lang/turkçe/admin.php dosyasını açın ve bu kodu bulun
Code: [Select]
$lang['resizing_image_error'] = "Error converting image file!";bu kodun hemen altına bunu ekle
Code: [Select]
//-----------------------------------------------------
//--- Images hits stats -------------------------------
//-----------------------------------------------------
$lang['image_hits_stats'] = "Image hits stats";
$lang['image_hits_description'] = "Check for image hits for each images";
$lang['image_hits_no_content'] = "No content";
$lang['image_hits_image_name'] = "Image name";
$lang['image_hits_added_on'] = "Added on";
$lang['image_hits_title'] = "Image hits";
işlem tamamdır :)
« Last Edit: May 01, 2008, 10:11:32 AM by DilnüvaZ »

Offline sanko86

  • Sr. Member
  • ****
  • Posts: 310
    • View Profile
    • Elemegim
Re: Resimlerinizin hitini öğrenin
« Reply #1 on: May 01, 2008, 10:07:31 AM »
Sayın dostum başlığı "[MOD]Resimlerinizin hitini öğrenin" gibi değiştirsen sevinirim bence bu mod ve güzel bir mod eline sağlık.
Web site:http://www.anlatiyoruz.com
Hayat zorluklarla doludur.Ama en zoru insanın insana düşmanlığıdır.

Offline DilnüvaZ

  • Moderator
  • Hero Member
  • *****
  • Posts: 527
  • Gönül Okşayıcı
    • View Profile
    • Nuvanda Resimlere Dair Ne Varsa
Re: Resimlerinizin hitini öğrenin
« Reply #2 on: May 01, 2008, 10:12:24 AM »
Sayın dostum başlığı "[MOD]Resimlerinizin hitini öğrenin" gibi değiştirsen sevinirim bence bu mod ve güzel bir mod eline sağlık.
rica ederim. unutmuştum ıyıkı hatırlattın. diğer arkadaşlarımızın da mod oların başına yazdım :)

Offline sanko86

  • Sr. Member
  • ****
  • Posts: 310
    • View Profile
    • Elemegim
Re: [MOD]Resimlerinizin hitini öğrenin
« Reply #3 on: May 01, 2008, 10:24:36 AM »
Ayrıca lang/turkce/admin.php de
Code: [Select]
$lang['resizing_image_error'] = "Yeniden boyutlandırma yapılırken bir hata oluştu!";bu kod mevcut.Yanlış anlaşılma olabilir diye paylaşmak istedim.

Deneme yaptım gayet güzel
ekran görüntüsünü ekte veriyorum.
Web site:http://www.anlatiyoruz.com
Hayat zorluklarla doludur.Ama en zoru insanın insana düşmanlığıdır.

 

Post your comments here