Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Modyfikacja modułu
Rajdon
post
Post #1





Grupa: Zarejestrowani
Postów: 73
Pomógł: 0
Dołączył: 7.06.2009

Ostrzeżenie: (0%)
-----


Witam, posiadam modyfikacje która na stronie dodaje newsa wraz z ikoną którą mogę wybrać z folderu "/upload/icons/
i tu właśnie chciałbym aby ikonę/obraz podawać przez link do pliku.

pliki php modyfikacji:

modules/top_list.php

  1. <?php
  2. /*
  3. =====================================================
  4. -----------------------------------------------------
  5.  Copyright (c) 2004,2009 SoftNews Media Group
  6. =====================================================
  7. */
  8. if(!defined('DATALIFEENGINE'))
  9. {
  10.  die("Hacking attempt!");
  11. }
  12.  
  13. $topitems = dle_cache("topitems", $config['skin']);
  14.  
  15. if (!$topitems) {
  16.  
  17.    $db->query("SELECT id, name, link, icon, type, place FROM " . PREFIX . "_toplist ORDER BY place ASC");
  18.  
  19.  
  20.    while($row = $db->get_row()){
  21.  
  22.    if (strlen($row['name']) > 50)
  23.        $title = substr ($row['name'], 0, 50)." ...";
  24.        else
  25.        $title = $row['name'];
  26.    $title = stripslashes($title);
  27.  
  28.    $tpl->load_template('top_list.tpl');
  29.    $tpl->set('{icon}', $config['http_home_url'].'uploads/top_icons/'.$row['icon']);
  30.    $tpl->set('{title}', '<a href="'.$row['link'].'">'.$title.'</a>');
  31.    $tpl->set('{type}', $row['type']);
  32.    $tpl->set('{odsylacz}', '<a href="'.$row['link'].'" class=main_menu_lnk >');
  33.    $tpl->compile('topitems');
  34.    $tpl->clear();
  35.    }
  36.  
  37.    $db->free();
  38.    create_cache ("topitems", $topitems, $config['skin']);
  39.    }
  40.  
  41. ?>


inc/top_list.pl
Kod
http://odsiebie.com/pokaz/3969003---01a9.html


proszę o pomoc worriedsmiley.gif

Ten post edytował Rajdon 4.07.2009, 00:19:56
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 13:47