Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - dosensteck

Pages: [1] 2 3
1
Mods & Plugins (Requests & Discussions) / Rating für Bild abschalten
« on: August 03, 2008, 05:16:14 PM »
Wer rastet der Rostet... Hab jetzt schon einige Zeit nichts mit php und 4images gemacht

Also ich habe vor Usern zu ermöglichen die Bilder bewerten zu lassen oder eben nicht.

Beim Upload "Bewertungen erlauben [] Ja [] Nein"

Ich mach ein Feld in der Datenbank bei 4images_images -> allow_rating als tinyint(1)

Bei der details.php lese ich den spass wieder aus. Und jetzt kommt mein Problem / wo ich nicht weiter weiß.
Wie blende ich die Rate Form am besten aus wenn keine bewertungen gewünscht sind?

Wird warscheinlich was ganz einfaches sein wo ich jetzt aber nicht draufkomme...

2
Mods & Plugins (Requests & Discussions) / Request: Quote Comments
« on: November 06, 2007, 09:33:46 PM »
I need a quote function for Comments.

Quote
Original posted by xxxx
Text

Found no Mods :(



3
Originall ein Mod für PHPBB der auch in 4images funktioniert! Das PHPBB Forenthema findet ihr hier


- Download der aktuellen Library
- Download des Proxy-Skriptes
- Upload des Ordners /googiespell ins root der Präsenz (wo auch die config.php liegt), Upload des Proxy-Skriptes in den googiespell-Ordner

Öffne die comment_form.html

füge ganz oben an der Datei ein:
Code: [Select]
<script type="text/javascript" src="googiespell/AJS.js"></script>
  <script type="text/javascript" src="googiespell/googiespell.js"></script>
  <script type="text/javascript" src="googiespell/cookiesupport.js"></script>
  <link rel="stylesheet" href="googiespell/googiespell.css" type="text/css" />

Finde:
Code: [Select]
<textarea name="comment_text"
danach einfügen
Code: [Select]
id="message"
Finde
Code: [Select]
</textarea>
danach einfügen
Code: [Select]
<script type="text/javascript">
  var googie1 = new GoogieSpell("googiespell/", "googiespell/sendReq.php?lang=");
  googie1.setLanguages({'de': 'Deutsch', 'en' : 'Englisch'});
  googie1.lang_chck_spell = "Rechtschreibprüfung";
  googie1.lang_rsm_edt = "Text bearbeiten";
  googie1.lang_close = "schliessen";
  googie1.lang_no_error_found = "Kein Fehler gefunden";
  googie1.lang_revert = "zurücksetzen auf";
  googie1.decorateTextarea("message");
  </script>

Und das wars auch schon :)






4
Chit Chat / cracker tracker
« on: May 27, 2006, 01:07:35 PM »
http://www.cback.de/cback_software/standalonect.php

benutzt den jemand? hab den gestern für mein phpbb forum eingebaut und diese standalone version auch für 4images :)
funktionieren tut er aufjedenfall
http://hobby-fotografen.com/index.php?chr(test)

was findet ihr? eine sinnvolle lösung um sich vor angriffen zu schützen?
habe die security fixes für 1.7.1 zwar eingebaut, man kann aber nie wissen ;)

bin nämlich diese woche gehackt worden und das trotz aktueller scripte (bzw. aktuelle versionen) - ist das eine lösung für 4images falls wieder eine sicherheitslücke auftaucht? wie bekannt ist schläft der teufel nie :D


achja - falls noch jemand ein phpbb forum hat und die knowledgebase installiert hat
http://archives.neohapsis.com/archives/secunia/2006-q2/0402.html

5
Chit Chat / wurde gehackt
« on: May 04, 2006, 11:44:04 PM »
 :mrgreen:

http://beta.hobby-fotografen.com/

ist wie die url verratet nur das betasystem, unter www.hobby-fotografen.com funktioniert noch alles.
auf beta.hobby-fotografen.com hatte ich noch ein phpbb 2.15 installiert - auf der hauptseite ein 2.20
ob jetzt 4 images daran schuld ist oder phpbb (tippe aber aufs phpbb) weiß ich nicht.

finde es nur ziemlich lustig das mein betasystem gehackt wurde das nochnie wohin verlinkt wurde :)

6
Titel & Meta für Kategorien & Bilder

Öffne /includes/page_header.php

Finde
Code: [Select]
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------

darüber einfügen
Code: [Select]

////////////////////////////////////////////
//----  PAGE TITLE ------------------------
///////////////////////////////////////////

if ($_SERVER['PHP_SELF'] == "/categories.php")
{
$cat_id = $_GET['cat_id'];
$sql = "Select cat_name, cat_description
       FROM ".CATEGORIES_TABLE."
       WHERE cat_id = $cat_id";
$result = $site_db->query_firstrow($sql);


$title .= $result[cat_name];
$title .= " / ";
$meta_desc = $result[cat_description];
}

elseif ($_SERVER['PHP_SELF'] == "/details.php")
{
$image_id = $_GET['image_id'];
$sql = "Select image_name, image_description
       FROM ".IMAGES_TABLE."
       WHERE image_id = $image_id";
$result = $site_db->query_firstrow($sql);


$title .= $result[image_name];
$title .= " / ";
$meta_desc = $result[image_description];
}

else
{
$title = "";
$meta_desc = "Deine Meta description eingeben";
}

$site_template->register_vars(array(
"title" => $title,
"meta_desc" => $meta_desc,
));

bitte beim letzten $meta_desc eure meta description eingeben ;)

öffne /templates/default/header.html

finde
Code: [Select]
{site_name}
davor in der zeile einfügen
Code: [Select]
{title}
finde
Code: [Select]
<meta name="description" content="
diese zeile mit dieser ersetzen (inkl. bisheriger beschreibung) - falls nicht vorhanden einfügen
Code: [Select]
<meta name="description" content="{meta_desc}">
damit habt ihr nun bei bildern & bei Kategorien die jeweiligen Titel als Pagetitel, und die jeweilige beschreibung als meta description


ps: ziemlicher php anfänger, wenn es intelligentere oder bessere lösungen gibt bitte melden :)


demo: http://hobby-fotografen.com/ allerdings habe ich noch keine kategorienbeschreibungen ;)

7
Discussion & Troubleshooting / sql abfragen problem (user ids)
« on: March 28, 2006, 09:40:41 PM »
Also, ich habe 4images mit phpbb integriert, habe für das phpbb einen buddymod installiert und wollte es soweit mit 4images verknüpfen das man auch die bilder seiner buddys anzeigen kann.

jetzt habe ich probleme mit den sql abfragen...

was ich bis jetzt habe (search.php modifiziert):

Code: [Select]
if (isset($HTTP_POST_VARS['buddy']) || isset($HTTP_GET_VARS['buddy'])) {
$vote = (isset($HTTP_POST_VARS['buddy'])) ? intval($HTTP_POST_VARS['buddy']) : intval($HTTP_GET_VARS['buddy']);
if ($buddy) {
  $show_result = 1;

$sql = "SELECT buddy_id, user_id
FROM phpbb_buddies
WHERE user_id = ".$user_table_fields['user_id'];

 $result = $site_db->query($sql);
 $buddy_ids = "";
 while ($row_buddy = $site_db->fetch_array($result)){
  $ids .= $row_buddy['buddy_id'].", ";
}
 $buddy_ids = trim($ids, ", ");

$sql = "SELECT image_id, user_id
  FROM 4images_images
WHERE user_id = ".$buddy_ids;
 $result = $site_db->query($sql);
 $ids = "";
 while ($row = $site_db->fetch_array($result)){
  $ids .= $row['image_id'].",";
  }
  $search_id['image_ids'] = trim($ids, ",");
 }
}

tja, ich habe gedacht das es eben funktioniert indem ich zuerst die user_ids der buddys auslese und dann die user ids so suchen lasse "WHERE user_id = ".$buddy_ids;"
anscheinend falsch gedacht. meine frage nun: kann man so überhaupt nach mehreren usern suchen?
der sql error sagt
Code: [Select]
DB Error: Bad SQL Query: SELECT image_id, user_id FROM 4images_images WHERE user_id = 189, 37, 63, 219ich dachte eben das man bei where mehrere user_ids angeben kann. wenn ich nur einen buddy hätte würde es funktionieren, wenn aber mehrere buddys vorhanden sind geht es eben nicht. hoffe jemand weiß rat

8
Discussion & Troubleshooting / User können keine Kommentare editieren
« on: February 24, 2006, 09:39:42 AM »
Bei mir funktioniert es schon seit einiger Zeit nicht(mehr) das User Kommentare editieren können, allerdings habe ich keine Ahnung an was das liegt :/

vielleicht kann ja mal jemand meine details.php ansehen und kommt drauf was es da haben kann http://www.hobby-fotografen.com/details.phps
Wenn ihr es Testen wollt dann könnt ihr euch auch einloggen - und zwar mir User: dosensteck Pass: test
Ein Kommentar wurde mit diesen Username abgegeben -> http://www.hobby-fotografen.com/img1229.htm und wie man sieht keine bearbeiten oder löschen funktion (wenn ihr euch einloggt)

Meine Comment_bit.html sieht so aus:
Code: [Select]
    <table border="0" cellpadding="4" cellspacing="0" width="500">
      <tr>
        <td class="head1" width="345"><b>{comment_user_name},</b> {comment_date}</td>
        <td class="head1" width="133" align="right">{comment_user_profile_button}</td>
      </tr>
      <tr>
        <td class="row4" colspan="2" width="488">{comment_text} </td>
      </tr>
      <tr>
        <td align="right" height="20" colspan="2" width="488">
{if admin_links}{admin_links}{endif admin_links} </td>
      </tr>
 
    </table>

Admins sehen auch den bearbeiten und löschen link.

9
Templates & Styles (Requests & Discussions) / Quadratische Thumbnails?
« on: February 17, 2006, 09:00:53 PM »
Wie kann man es anstellen das Thumbnails alle Quadratisch sind, allerdings ohne Verzerrung, sondern das der überschüssige Bereich einfach wegfällt? Also das der grösstmögliche Bereich gewählt wird?

Hae schon ein wenig gegoogelt, allerdings nichts Interessantes gefunden - vielleicht hat ja jemand einen Tipp?

10
Mods & Plugins (Requests & Discussions) / S: [Mod] Comment Subscription
« on: February 08, 2006, 10:24:45 PM »
Vor dem Crash gab es diesen mod, ich hab ihn auch schon ein paarmal auf 4images seiten gesehen. allerdings bietet ihm niermand als download an...

Hat den Mod vielleicht noch jemand? In Suchmaschinen Cache seiten finde ich leider nichts :/


11
Mods & Plugins (Requests & Discussions) / Pointrating?
« on: January 18, 2006, 07:20:10 PM »
I search a way to change the result for votes
Now its cut through, i will add the votes.

For Example: 5 Votes
3
4
2
5
1

Now its  3 / 5 Votes
I will that the result is 15

I hope you understand my english :D


In Deutsch:
Ich suche nach einer möglichkeit die Ergebnisse für die Abstimmungen zu Ändern.
Jetzt ist es der Durchschnitt, ich will die Abstimmungen Addieren.

Zum Beispiel, 5 Abstimmungen
3
4
2
5
1

Jetzt ist es 3 / 5
Ich will das 15 Rauskommt.

12
Discussion & Troubleshooting / user kann nicht uploaden
« on: December 14, 2005, 11:12:23 AM »
so, da ich mit meinem englisch eh nix erreiche und ich die letzten male auch nicht verstanden wurde schreibe ich diesen thread einfach in deutsch :D

also, einer meiner user versucht seit tagen ein bild hochzuladen, es funktioniert bei keinem seiner bilder. andere user laden normal bilder hoch.
der user hat mir das bild geschickt, ich habe es mit photoshop geöffnet und bekam die meldung das das icc profil kaputt ist, habe es dann neu abgespeichert und ihm zurückgeschickt - diese datei hat er auch nicht hochladen können.

stehe nun an und weiß nicht weiter, bin an der fehlersuche, finde aber nichts. andere user stellen normal bilder ein.

irgendwelche ansätze was da schieflaufen könnte?

13
Discussion & Troubleshooting / link for categorie search?
« on: December 13, 2005, 04:40:57 PM »
i need the link for search categories with all users...

in the search i use '*' for 'username' and a category - the result is all images in cat & sub categories with mode=search
i need that for my main cats

in the session_vars (mysql) is this
Code: [Select]
a:2:{s:8:"user_ids";s:581:"-1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 56, 34, 35, 36, 38, 37, 39, 57, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 50, 52, 53, 54, 55, 58, 60, 59, 61, 62, 63, 64, 66, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 83, 80, 81, 82, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 96, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 123, 122, 125, 124, 126, 127, 128, 129, 130, 131, 132, 135, 133, 134, 137, 136, 138";s:10:"search_cat";i:8;}
 :?:

search_user=* dont work
search_cat=x dont work
user_ids=* dont work

:/

14
Nicht mein mod - mod author: panoman
gefunden im google cache.

panoman:
Quote
Anzeige von Panoramen mittels Applet im Kurzform

1. Neuen Typ eintragen: bspw. "pano" in die Liste
der Dateiendungen (Erlaubte Datei-Typen). Das sieht dann etwa so aus:
jpg,gif,png,aif,au,avi,mid,mov,mp3,mpg,swf,wav,ra,rm,zip,pdf,pano

2.Im Verzeichnis: template/default/media eine Datei namens
"pano.html" erzeugen mit bspw. diesem (minimalen) Inhalt:
<APPLET codebase="http://www.deinedomain.de/dein4images/" archive=ptviewer.jar code=ptviewer.class width="432" height="240">
<PARAM name=file value="{media_src}">
</APPLET>
ob die o.g. Angabe der Codebase notwendig ist, ist zweifelhaft,aber vielleicht sicherer...

3.Falls(!) der Ptviewer benutzt werden sollte, dann ptviewer.jar (24kb)in das Verzeichnis <dein4images>, nämlich die Root, wo sich alle Main-PHP's (details.php) befinden, kopieren. Dann kann man sicher
auch die Codebase im Aufruf vom Applet weglassen.

4. In upload_definitions.php zur Sicherheit noch
$mime_type_match['pano'] = array("image/jpeg");
einfügen.

5. Ein Vorschaubild nach "Maximale Breite der Thumbnail-Bilder in Pixel" (150 pixel) aus dem zukünftigen "Panobild.jpg" ein Teilbild mit bspw. 150 pixel Breite zurechtschneiden (+schärfen sieht gut aus) und
"pre-panobild.jpg" nennen.

5. Vor dem Upload muß noch das Panoramabild ("panobild.jpg")in "panobild.pano" umbenannt werden.
Das ist mit dem MS-Explorer in XP nicht mehr möglich, denn es wird oft "panobild.pano.jpg" daraus und der Typ-jpg bleibt. Es darf danach kein JPG-Typ mehr sein, sondern ein Typ=Pano-Datei. Wichtig!
Ich nehme dazu einfach "Idoswin Pro", der kann das.

6. Nun kann das ürsprüngliche panobild.jpg mutiert zu "panobild.pano" mit der Vorschau "pre-panobild.jpg" (Thumnail-Breite beachten) erfolgreich zum Upload und zur erfolgreichen Anzeige kommen.

7. Resume: Die Anzeige der Panos ist besser+klarer als mit QTVR (mov)
Man kann noch diverse "Mätzchen" ranbasteln (s.o. in pano.html),
um die Anzeige noch zu verschönern.

Pano4u

panoman:
Quote
Nachtrag zum Vorschaubild:

Natürlich muß das alles auch funktionieren, wenn kein Exclamation Vorschaubild
beim Upload angegeben wurde.

NUR, muss dazu ein default-Bild für den Typ pano geschaffen werden und
im Verzeichnis als -> default/icon/pano.gif abgelegt werden.
Hierzu nimmt man sich einfach jpg.gif, modifiziert
es mit der Aufschrift "pano" und speichert dies dann als pano.gif.


pano4u

user können aber keine grösseren bilder hochladen, deswegen hat jan diese lösung gepostet:
Quote
Suche in includes/upload.php diese Zeile
Code: [Select]
function check_image_size() {und füge darunter folgednes ein
Code: [Select]
if ($this->extension == 'pano') {
    return 1;
  }

kein support meinerseits, ich bin nur der finder ;)

15
NOT MY MOD, FOUND IN GOOGLE CACHE! NO SUPPORT!
Mod Author: rproctor

PAGING PROBLEM GELÖST

You can go hee to my test site which I mess with code and what not. This is a direct link to a main category which has the master_cat turned on and this mod installed.

http://www.digitalgod.biz/test/categories.php?cat_id=4

I needed a way to better organize my categories. I didnt want my main categories to have any submissions, only my sub categories, but it looks so ugly when you view a main category and it says 0 images found. So, instead with a few tweeks, I made categories that I selected display the images of the subcategories.

The downfall is that if you select a category to display subcat images, it will only display FIRST LEVEL sub cat images. Also, if you upload an image where it is specified to show sub cat images, the image will now show up in the category, this is why you should only upload to sub cats that are not checked to disply subcat images. However, you can check sub cats to display sub cat images if that sub cat has a sub cat. Sub cat main cat blue cat green cat... Confused yet? Wink

1) First thing to do is create a field in the CATEGORIES_TABLE using a program like PHPMyAdmin. This field should be named cat_master and a type of tinyint(1), not null, and 0 for default.

2) Now, the boring part. Its time to edit the admin category file so that we can edit this field via ACP. Open admin/categories.php and find

Code: [Select]
  $cat_hits = intval(trim($HTTP_POST_VARS['cat_hits']));

Add after

Code: [Select]
  $cat_master = intval(trim($HTTP_POST_VARS['cat_master']));

2.1) find

Code: [Select]
            SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment

Replace with

Code: [Select]
            SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment, cat_master = $cat_master

2.2) find

Code: [Select]
  $sql = "SELECT cat_name, cat_description, cat_parent_id, cat_hits, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment

Replace with

Code: [Select]
  $sql = "SELECT cat_name, cat_description, cat_parent_id, cat_hits, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_master

2.3) find

Code: [Select]
  show_input_row($lang['field_hits'], "cat_hits", $result['cat_hits'], 5);

add after

Code: [Select]
  show_radio_row("cat_master", "cat_master", $result['cat_master']);

2.4) find

Code: [Select]
  $sql = "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment

Replace with

Code: [Select]
  $sql = "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_master
/
3) Now its time to make it work. Open 4images/categories.php and find

Code: [Select]
//-----------------------------------------------------
//--- Show Categories ---------------------------------
//-----------------------------------------------------

Add right before it

Code: [Select]
$sql = "SELECT cat_master
      FROM ".CATEGORIES_TABLE."
      WHERE cat_id = $cat_id";
$master_cat = $site_db->query_firstrow($sql);

3.1) Next find

Code: [Select]
"cat_name" => htmlspecialchars($cat_cache[$cat_id]['cat_name']),
Change to

Code: [Select]
"cat_name2" => htmlspecialchars($cat_cache[$cat_id]['cat_name']),
in 4images v1.7.6 find:
Code: [Select]
  "cat_name" => format_text($cat_cache[$cat_id]['cat_name'], 2),
Change to
Code: [Select]
  "cat_name2" => format_text($cat_cache[$cat_id]['cat_name'], 2),

3.2) Find

Code: [Select]
if (!$num_rows)  {
  $thumbnails = "";
  $msg = $lang['no_images'];
}

Replace with

Code: [Select]
if (!$num_rows)  {
  $thumbnails = "";
      if ($master_cat['cat_master'] == 1){
           $msg = "";
      }
      else{
           $msg = $lang['no_images'];
      }
}

3.3) Now find

Code: [Select]
$site_template->register_vars("thumbnails", $thumbnails);
unset($thumbnails);

Add below

Code: [Select]


//-----------------------------------------------------
//--- Show Sub Images ---------------------------------
//-----------------------------------------------------

if ($master_cat['cat_master'] == 1){



$sql = "SELECT cat_parent_id
        FROM ".CATEGORIES_TABLE."
      WHERE cat_parent_id = $cat_id";
$total_subs = $site_db->query($sql);
$num_subs = $site_db->get_numrows($total_subs);



$sql = "SELECT i.image_id, i.cat_id, i.image_active, c.cat_parent_id
        FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
        WHERE i.image_active = 1 AND c.cat_parent_id = $cat_id AND c.cat_id = i.cat_id";

$result2 = $site_db->query($sql);
$num_rows2 = $site_db->get_numrows($result2);


$link_arg = $site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id);

//include(ROOT_PATH.'includes/paging.php');
$getpaging = new Paging($page, $perpage, $num_rows2, $link_arg);
$offset = $getpaging->get_offset();


$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_parent_id, c.cat_name".get_user_table_field(", u.", "user_name")."
        FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_active = 1 AND c.cat_parent_id = $cat_id AND c.cat_id = i.cat_id
        ORDER BY ".$config['image_order']." ".$config['image_sort']."
        LIMIT $offset, $perpage";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);


$imgtable_width = ceil((intval($config['image_table_width'])) / $config['image_cells']);
if ((substr($config['image_table_width'], -1)) == "%") {
  $imgtable_width .= "%";
}

$additional_sql = "";
if (!empty($additional_image_fields)) {
  foreach ($additional_image_fields as $key => $val) {
    $additional_sql .= ", i.".$key;
  }
}

if (!$num_rows)  {
  $thumbnails = "";
  $msg = $lang['no_images'];
}
else {
  $thumbnails = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n";
  $count = 0;
  $bgcounter = 0;
  while ($image_row = $site_db->fetch_array($result)){
    if ($count == 0) {
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
      $thumbnails .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    $thumbnails .= "<td width=\"".$imgtable_width."\"  =\"top\">\n";

    show_image($image_row);
    $thumbnails .= $site_template->parse_template("thumbnail_bit");
    $thumbnails .= "\n</td>\n";

    $count++;
    if ($count == $config['image_cells']) {
      $thumbnails .= "</tr>\n";
      $count = 0;
    }
  } // end while

  if ($count > 0)  {
    $leftover = ($config['image_cells'] - $count);
    if ($leftover > 0) {
      for ($i = 0; $i < $leftover; $i++){
        $thumbnails .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      $thumbnails .= "</tr>\n";
    }
  }
  $thumbnails .= "</table>\n";
} //end else
$site_template->register_vars("thumbnails", $thumbnails);
unset($thumbnails);
}

4) Here is the last and easiest part. Open 4images/templates/<your_template>/categories.php and change {cat_name} to {cat_name2}.

5) Now upload your edited files to your site. Next enter your ACP and select "Edit categories". You should notice a new field under hits called cat_master, change this to yes to enable this mod for that category. Dont forget, if you upload an image to that category and it has cat_master enabled that image will now show, so you should disable uploading for that category.

Thats about it, hope it works ok, I tested my own instructions on a new installation to make sure I did everything right, and it all seems to be ok.

DEMO: http://www.hobby-fotografen.com/categories.php?cat_id=19

ps: sorry for my bad english :/


so, habe das pagingproblem nun doch in den griff bekommen, und der mod funktioniert jetzt einwandfrei (vielleicht nicht sauber gecodet - funzt aber :D)



Pages: [1] 2 3