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.


Messages - effemmess

Pages: 1 [2]
16
Plugins / [Plugin] Import images from external webspace (Beta)
« on: June 17, 2003, 02:11:35 AM »
@m-a-b
Ich schau es mir morgen mal an... :wink:

good night

17
Hi ladies and gentlemen,

do I have an addon for the addon of the addon to the addon ... ???
Yes!!! :D

But first my version of our function:
Code: [Select]
function get_category_path($cat_id = 0, $detail_path = 0, $page = 0, $page_details = 0) { // V3 by effemmess
  global $site_sess, $config, $cat_cache, $url, $lang;
  $parent_id = 1;
  while ($parent_id) {
    if (!isset($cat_cache[$cat_id]['cat_parent_id'])) {
      return false;
    }
    $parent_id = $cat_cache[$cat_id]['cat_parent_id'];
    if (empty($path)) {
      if ($detail_path) {
        $cat_url = ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id;

/* imo we do not need this, because we do later our own page-handling...        
           if (preg_match("/".URL_PAGE."=([0-9]+)/", $url, $regs)) {
             printf($regs[1]."<br />");
             if (!empty($regs[1]) && $regs[1] != 1 && !$page_details) {
               $cat_url .= "&amp;".URL_PAGE."=".$regs[1];
             }
           }
*/
        $path = "<a href=\"".$site_sess->url($cat_url)."\" class=\"clickstream\">".$cat_cache[$cat_id]['cat_name']."</a>";
      }
      else  {
        $path = $cat_cache[$cat_id]['cat_name'];
      }
    }
    else {
      $path = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id)."\" class=\"clickstream\">".$cat_cache[$cat_id]['cat_name']."</a>".$config['category_separator'].$path;
    }
    $cat_id = $parent_id;
  } // end while
  $pagereg  = "&amp;".URL_PAGE."=".$page;
  $page     = ($page_details) ? "<a href=\"".$site_sess->url($cat_url.$pagereg)."\" class=\"clickstream\">".$lang['page']." ".$page."</a>" : $lang['page']." ".$page;
  $path     = $path.$config['category_separator'].$page;
  return $path;
}


clickstream in categories.php:
Code: [Select]
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].get_category_path($cat_id, 1, $page)."</span>";

clickstream in details.php:
Code: [Select]
 $clickstream .= get_category_path($cat_id, 1, $cur_page, 1).$config['category_separator'];

It produces following:

Clickstream from categories.php while on page 1
Home | CategoryName | Page 1

Clickstream from categories.php while on page 2 or higher
Home | CategoryName | Page 4

Clickstream from details.php when image is on page 1
Home | CategoryName | Page 1 | ImageName

Clickstream from details.php when image is on page 2 or higher
Home | CategoryName | Page 4 | ImageName

Note that all bold items are clickable, the categorie-items are links to page 1.

Imo this is the best solution...what do you think. :roll:
@Xwall
How do you feel now?  :D

And now:
In all other php-files with paging you can do following:
before $clickstream="..." add
Code: [Select]
$page= (empty($page)) ? 1 :$page;

and edit the clickstream-row!
for example in lightbox.php:
Code: [Select]
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];
$clickstream.= "<a href=\"".$site_sess->url(ROOT_PATH."lightbox.php")."\" class=\"clickstream\">".$lang['lightbox']."</a>".$config['category_separator'];
$clickstream.= $lang['page']." ".$page."</span>";


cu and good night...mhhh only 2,5 h to sleep... :(  
effemmess

PS: you can show, how it looks at: http://www.auf-einem-blick.de
bye

18
Hi,
I have a new addon to my addon of v@no´s addon...,  :D
and a question to discuss.
First the addon:
If you want it in your language you must do following:

In Step 2.2. by effemmess
do not add:
Code: [Select]
 if ($page > 1){
    $path = $path.$config['category_separator']."<a href=\"".$site_sess->url($cat_url."&amp;".URL_PAGE."=".$page)."\" class=\"clickstream\">page ".$page."</a>";
  }

but
Code: [Select]
 if ($page > 1){
    $path = $path.$config['category_separator']."<a href=\"".$site_sess->url($cat_url."&amp;".URL_PAGE."=".$page)."\" class=\"clickstream\">".$lang['page']." ".$page."</a>";
  }

Step 2.3. by effemmess
Find:
Code: [Select]
 global $site_sess, $config, $cat_cache, $url;
Replace:
Code: [Select]
 global $site_sess, $config, $cat_cache, $url,$lang;
Step 3. by effemmess
Open /lang/.../main.php
Add wherever you want after
Code: [Select]
<? and before
Code: [Select]
?>
this
Code: [Select]
$lang['page'] = "Seite"; // or whatever you want (e.g. straniza  :-) )

That´s all.
--------------------------
And now the question:
If I do not do
Code: [Select]
        if ($page > 1) {
           $extension= "&amp;".URL_PAGE."=".$page;
         }else{
           if (preg_match("/".URL_PAGE."=([0-9]+)/", $url, $regs)) {
             if (!empty($regs[1]) && $regs[1] != 1) {
               $cat_url .= "&amp;".URL_PAGE."=".$regs[1];
             }
           }
         }

and in consequence
Code: [Select]
 if ($page > 1){
    $path = $path.$config['category_separator']."<a href=\"".$site_sess->url($cat_url.$extension."=".$page)."\" class=\"clickstream\">".$lang['page']." ".$page."</a>";
  }

the value of $regs[1] == $page and in consequence the subcat hasn´t the link to page1. In v@no´s demolink it´s okay, but why??? :?:
Here is my complete not functioning function get_category_path
Code: [Select]
function get_category_path($cat_id = 0, $detail_path = 0, $page = 0) { //nicht i.O.
  global $site_sess, $config, $cat_cache, $url, $lang;
  $parent_id = 1;
  while ($parent_id) {
    if (!isset($cat_cache[$cat_id]['cat_parent_id'])) {
      return false;
    }
    $parent_id = $cat_cache[$cat_id]['cat_parent_id'];

    if (empty($path)) {
      if ($detail_path) {
        $cat_url = ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id;
        if (preg_match("/".URL_PAGE."=([0-9]+)/", $url, $regs)) {
          if (!empty($regs[1]) && $regs[1] != 1) {
            $cat_url .= "&amp;".URL_PAGE."=".$regs[1];
          }
        }
        $path = "<a href=\"".$site_sess->url($cat_url)."\" class=\"clickstream\">".$cat_cache[$cat_id]['cat_name']."</a>";
      }
      else  {
        $path = $cat_cache[$cat_id]['cat_name'];
      }
    }
    else {
      $path = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id)."\" class=\"clickstream\">".$cat_cache[$cat_id]['cat_name']."</a>".$config['category_separator'].$path;
    }
    $cat_id = $parent_id;
  } // end while
  if ($page > 1){
    $path = $path.$config['category_separator']."<a href=\"".$site_sess->url($cat_url."&amp;".URL_PAGE."=".$page)."\" class=\"clickstream\">".$lang['page']." ".$page."</a>";
  }
  return $path;
}

And here is my complete at my site functioning function get_category_path
Code: [Select]
function get_category_path($cat_id = 0, $detail_path = 0, $page = 0) { // i.O.
  global $site_sess, $config, $cat_cache, $url, $lang;
  $parent_id = 1;
  while ($parent_id) {
    if (!isset($cat_cache[$cat_id]['cat_parent_id'])) {
      return false;
    }
    $parent_id = $cat_cache[$cat_id]['cat_parent_id'];

    if (empty($path)) {
      if ($detail_path) {
        $cat_url = ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id;
        if ($page > 1) {
          $cat_url_ext = "&amp;".URL_PAGE."=".$page;
        }
        else{
          if (preg_match("/".URL_PAGE."=([0-9]+)/", $url, $regs)) {
            if (!empty($regs[1]) && $regs[1] != 1) {
              $cat_url .= "&amp;".URL_PAGE."=".$regs[1];
            }
          }
        }
        $path = "<a href=\"".$site_sess->url($cat_url)."\" class=\"clickstream\">".$cat_cache[$cat_id]['cat_name']."</a>";
      }
      else  {
        $path = $cat_cache[$cat_id]['cat_name'];
      }
    }
    else {
      $path = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id)."\" class=\"clickstream\">".$cat_cache[$cat_id]['cat_name']."</a>".$config['category_separator'].$path;
    }
    $cat_id = $parent_id;
  } // end while
  if ($page > 1){
    $path = $path.$config['category_separator']."<a href=\"".$site_sess->url($cat_url.$cat_url_ext)."\" class=\"clickstream\">".$lang['page']." ".$page."</a>";
  }
  return $path;
}

Has anybody (v@no) an idea? :?:  :?
cu

19
Hi all,
I have little addon to v@no´s addon:

If you would to have the clickstream in the form as
Home / cat name / subcat name / page2 / image name
then you must do the following in addition to (after!) v@no´s steps:
Step 3.1.
Open /includes/functions.php
Find:
Code: [Select]
$cat_url .= "&amp;".URL_PAGE."=".$page;
Replace with:
Code: [Select]
$pagereg= "&amp;".URL_PAGE."=".$page;

Step 3.2
Find:
Code: [Select]
 return $path;
Add before:
Code: [Select]
 if ($page>1){
    $path=$path.$config['category_separator']."<a href=\"".$site_sess->url($cat_url.$pagereg)."\" class=\"clickstream\">"."Seite ".$page."</a>";
  }


greetz
effemmess

20
Plugins / [Plugin] Import images from external webspace (Beta)
« on: June 06, 2003, 11:42:37 PM »
Hi,
ich machs mal in deutsch...

Das Plugin ist für all diejenigen gedacht, die Bilder (oder anderes) auf Nicht-4images-Servern gelagert haben und diese in ihre DB einstellen wollen. Die Bilder werden hierbei nicht upgeloadet! Es werden lediglich (hoffentlich) korrekte Einträge in der Tabelle 4images_images erstellt, die den Link zum externen Bild und Thumbnail enthalten. Vorweg wird noch geprüft, ob die Links auch funktionieren. Wenn der Link zum Bild nicht stimmt wird dieses eben nicht in die DB eingestellt, wenn nur das Thumbnail nicht erreichbar ist, dann wird das Bild ohne dieses eingestellt. In späteren Versionen soll hier noch eine Abfrage rein, ob es nun eingestellt werden soll oder nicht. Das Einlesen der Bilder geschieht mittels FTP. Hmmm, was gibts noch zu sagen... Verzeichnisrekursionen beim Einlesen sind momentan noch nicht möglich. Ebenso muß nochmal der Part mit den Plausibilitätsprüfungen überarbeitet werden. Aber es ist halt ne Beta  :wink:  So, was gibts noch... Man kann alles mögliche direkt in der Datei als Defaultwert einstellen - muß man aber nicht, dann muß man eben jedesmal alle Werte neu in das Formular eingeben. Nagut, das solls erstmal zur Funktionalität gewesen sein.
Das Plugin ist also insbesondere dann hilfreich, wenn:
- die allgemeine Serverlast des Servers sehr hoch ist,
- das Trafficvolumen des Providers begrenzt ist,
- die Bilder sowieso auf anderem Webspace liegen,
- wenn man Spaß am Basteln, Tüfteln, Experimentieren und Programmieren hat...

@V@no:
Du hast natürlich gleich die ersten Minibugs entdeckt... 8O  :wink:
Werd ich aber gleich bereinigen...
Wie schon irgendwo geschrieben, bin ich noch nicht der php-Vollprofi. Demzufolge spart nicht mit Kritik und  :idea: !!! Im php-script stehen noch ein paar Fragen und Bemerkungen von mir...

bye
effemmess

da ich zu faul bin, das Ganze ins Englische zu übertragen  :?  -> http://216.239.37.104/translate_c?langpair=de%7Cen&u=http://www.4homepages.de/forum/viewtopic.php?t=6078

21
Hi Maweryk,

Quote from: Maweryk
8O Ich bin schon heiß wie eine Kartoffel. Kannst Du nicht schon mal ne Beta ins Netz stellen???


hab soeben für dich und alle anderen heißen Kartoffeln  :wink: ne Beta veröffentlicht...

bye

achja...hier zu finden:
http://www.4homepages.de/forum/viewtopic.php?t=6078

22
Plugins / [Plugin] Import images from external webspace (Beta)
« on: June 06, 2003, 06:29:42 PM »
Allgemeines:

- Plugin zum Einstellen von images in die Datenbank von entferntem Webspace (kein Upload)
- entstanden aufgrund http://www.4homepages.de/forum/viewtopic.php?t=5773

Installation:

- Erstelle ein neues Verzeichnis plugins im admin Ordner
- Entpacke das zip
- editiere import_webimages.php (Defaultwerte einstellen)
- kopiere die Datei import_webimages.php in das neue plugins-Verzeichnis
- Logge Dich ins Control Panel ein, in der linken Navigation sollte eine neuer Menüpunkt erscheinen
- Draufklicken und Spass haben  :) 
- Kommentare, Hilfe und Vorschläge sind willkommen!
---------------------------------------------------------------------------------

General informations:

- Plugin for puting images into database from external webspace (no upload)
- developed due to http://www.4homepages.de/forum/viewtopic.php?t=5773

Installation:

- Create a new directory called plugins in your admin-folder
- Extract the zip
- edit import_webimages.php (set defaults)
- copy the file import_webimages.php to the new plugins-directory
- log in to your Control Panel, a new link should appear in the left navigation frame
- Click it an have fun  :)
- comments, help and suggestions are welcome


Download: http://pub.comnetonline.de/import_webimages_0.8.1.zip

Änderungen in V0.8.1:
- Änderung der Dateiendung der config-Datei
--------------------------------------------------------------
changes in V0.8.1
- config-file-extension changed
===================================
Änderungen in V0.8:
- Verarbeitung von Prefixes für Thumbnails integriert
- Auslagerung der Defaultwerte in eigene config-Datei
- einige Kommentare entfernt
--------------------------------------------------------------
changes in V0.8
- processing of thumb-prefixes
- paged out default values to its own config-file
- some comments removed

23
Hi,
wollt nur mitteilen, daß ich mich inzwischen als non-php-profi   :oops: nächtelang hingesetzt habe, um etwas passendes zusammenzustricken... Bei mir läufts schon super  :D , muß aber noch ein paar Kleinigkeiten ausbügeln. :?  ...und für die Profis gibts dann die Möglichkeit der Script-Optimierung bzw. noch besser mir entsprechende Tips zu geben!!! :roll:
Hoffe, ihr seid schon alle heiß drauf...
Gruß

24
Hi,
das sollte funktionieren...
1.Kategorien ganz normal erstellen (den Platz für leere Ordner wird man wohl haben... :wink: )
2.bereitstellen einer zusätzlichen adminseite "externe Bilder einstellen"
  -Abfrage der Daten(ext URL,ftp-zugang,sofort aktivieren,etc.)
3.skript checkexternimages.php
  -auslesen der ext. Ordnerinhalte mittels ftp (in irgend nem thread zum Thema Safe Mode wurde das mit ftp schon mal besprochen)
  -Aufruf von images.php - saveimages

Das Auslesen der iptc-Daten (was immer das auch sein mag) muß wohl wie schon irgendwo beschrieben ausgeschaltet werden.

Falls soetwas jemand bauen kann, ich würd mich riesig drüber freuen! :P

ciao

Pages: 1 [2]