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 - hinzwiekunz

Pages: 1 [2] 3 4
16
Hi,

i have made e a new colomn called "image_license" in the image_table. Now I want to give all those pictures that filename begins with e.g. "mh_" a new value in the new colomn. How could I do it? With phpmyadmin or with a little php-script?

I dont can script something like that, but i could imagin that this stuff could explain what I want to do:
Code: [Select]
IF 4images_images_image_media_file="mh_*" {
INSERT INTO 4images_images VALUES (",",",",",",",",",",",",",",",",",1)

The last value "1" is the new column and in the standard table on "0". The other values shouldnt be touched.


17
Discussion & Troubleshooting / Re: Neues Auswahl-Feld für Bilder
« on: July 28, 2005, 12:06:03 AM »
Danke Jan,
genau das hatte ich gesucht!  :lol: Hoffe es klappt...

18
Discussion & Troubleshooting / Re: Neues Auswahl-Feld für Bilder
« on: July 25, 2005, 10:27:19 PM »
Hat jemand einen Tip was ich nicht gemacht habe?


hinzwiekunz

19
Many Thanks, Vano.  :lol:

It works. But I don't understand why there are so differences. Some times its enough to take the entries in the llanguage_main, sometimes I need to register in page_header...
Are there some rules?

hinzwiekunz

20
mmmmh. I had a similar problem, but nothing is changed.

In page_header.php

i registered following lines:

Code: [Select]
// Replace Globals in $lang
$lang = $site_template->parse_array($lang);

$site_template->register_vars(array(
  "lang_site_stats" => $lang['site_stats'],
  "lang_license_free" => $lang['license_free'],
  "lang_license_notfree" => $lang['license_notfree'],
  "lang_license_all" => $lang['license_all'],

in the language-main-file i add also:

Code: [Select]
//-----------------------------------------------------
//--- Search ------------------------------------------
//-----------------------------------------------------
$lang['license_free'] = "Lizenzfrei";  // "NEU"
$lang['license_notfree'] = "Lizensiert";  // "NEU"
$lang['license_all'] = "alle Lizenzarten";  // "NEU"

and in my search_form.html-Template i want to use it:

Code: [Select]
<table border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><input type="radio" name="image_license" value="1" />
                    {lang_license_free}</td>
                <td>&nbsp;</td>
                <td><input type="radio" name="image_license" value="0" />
                    {lang_license_notfree}</td>
                <td>&nbsp;</td>
                <td><input type="radio" name="image_license" value="all" checked="checked" /> 
                    {lang_license_all}</td>
              </tr>
            </table>

But it doesn't display the text!!! Have I forgot something. I can't read any mistake...

21
Discussion & Troubleshooting / Neues Auswahl-Feld für Bilder
« on: July 16, 2005, 04:56:35 PM »
Hallo,

ich möchte ein neues Feld einfügen. Anhand der bisherigen Anleitungen...

http://www.4homepages.de/forum/index.php?topic=1313.0
http://www.4homepages.de/forum/index.php?topic=747

...habe ich auch einige Schritte geschafft.

Nun habe jedoch anstelle eines Textfeldes ein Auswahlfeld. Folgendes soll passieren:
Ich wähle im Control-Menü bei Bildbearbeitung eine Bildeigenschaft aus: "JA" oder "NEIN". Wenn ich sage "JA" soll in der detail-Ansicht etwas anderes angezeigt werden

als bei "NEIN", bzw. sollen an anderer Stelle Buttons ein- und ausblendbar sein.

Ich hatte es soweit geschafft, dass mir entweder gar nichts oder "1" angezeigt wird für dieses Feld.
Nun müsste ich - denke ich - eine IF-Schleife einbauen. Ich kann zwar {if_feld} {endif_feld} nutzen, aber ich bräuchte dann auch so etwas wie eine Verneinung davon. Es

soll ja auch was passieren wenn das Feld leer ist. Gibt es sowas wie {ifnot_feld}

Hintergrund ist, dass ein Bild als "Lizensiert" und "Lizensfrei" markiert werden soll. Bei Lizensiert wird eine andere Info in der details.php angezeigt, als bei einem

"Lizensfrei"-Bild, wo ein Link oder eine Tabelle angezeigt werden soll.

Ich hatte zwischenzeitlich zwei Felder getrennt eingerichtet, aber das ist nicht sinnvoll. Es soll einfach nur "entweder oder" geben.




Meine Änderungen...


db_field_definitions.php:

$additional_image_fields['image_license'] = array($lang['image_license'], "radio", 1);



Tabelle in DB/"images" und "images_temp": image_license  tinyint(1)   Nein  0 

22
Vielen Dank, Jan.
 :)
Das war eine sehr große Hilfe. Da wäre ich auch nie drauf gekommen...

23
Discussion & Troubleshooting / Please help... Bitte um Hilfe!
« on: July 10, 2005, 11:20:57 PM »
Bitte gebt mir doch mal einen Tip woran es liegen könnte, dass die Kategorien nicht richtig aufgeteilt werden...
Würde mir sehr helfen. So kann ich die Site nicht länger stehen lassen...

Gruß,
Markus

24
Hi,

ich lasse mir Thumbnails in den Kategorien anzeigen. Leider ist immer eine unschöne Lücke in der Thumbnail-Anordung. Obwohl es acht Kategorien sind, werden sie bei Einstellung von 4 Spalten (im Control Panel), nicht mit genau zwei Zeilen dargestellt, sondern leider mit einer Lücke und einer angefangenen dritten Zeile.

Zu sehen gerade hier:
http://www.bilderbande.de

Es wird wahrscheinlich in der functions.php liegen, oder? "function get_categories"? Nur daraus werde ich nicht wirklich schlau. Kann mir da jemand einen Tip geben?

-------------------------------------------

I use thumbnails in my categories. But there are Problems to display them in the right following. 8 categories, but not 4 colllums and 2 lines - there is one missing and using the 3 line.
Look for that:
http://www.bilderbande.de

Probably  to change something in "functions.php" (function get_categories). But I don't know what to do...

------------------------------------------- my categorie_bit-------------------------------------------

Code: [Select]
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="122" height="122" valign="bottom">
{if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file} </td>
  </tr>
  <tr>
    <td>
  <a href="{cat_url}" class="maincat">{cat_name}</a>&nbsp;({num_images})
      {if cat_is_new}<sup class="new">{lang_new}</sup>{endif cat_is_new}
</td>
  </tr>
</table>
{if cat_description}<span class="smalltext">{cat_description}</span><br />{endif cat_description}
{if sub_cats}{sub_cats}{endif sub_cats}


und die Datei functions.php (ausschnitt) aus include-Verzeichnis...
Code: [Select]
function get_categories($cat_id = 0) {
  global $site_template, $site_db, $site_sess, $config, $lang;
  global $cat_cache, $cat_parent_cache, $new_image_cache, $subcat_ids;

  $cattable_width = ceil((intval($config['cat_table_width'])) / $config['cat_cells']);
  if ((substr($config['cat_table_width'],-1)) == "%") {
    $cattable_width .= "%";
  }

  if (!isset($cat_parent_cache[$cat_id])) {
    return "";
  }

  $visible_cat_cache = array();
  foreach ($cat_parent_cache[$cat_id] as $key => $val) {
    if (check_permission("auth_viewcat", $val)) {
      $visible_cat_cache[$key] = $val;
    }
  }

  if (empty($visible_cat_cache)) {
    return "";
  }

  $total = sizeof($visible_cat_cache);
  $table_columns = (intval($config['cat_cells'])) ? intval($config['cat_cells']) : 2;
  if ($total <= $table_columns) {
    $table_rows = 1;
  }
  else {
    $table_rows = $total / $table_columns;
    if ($total >= $table_columns && !is_integer($table_rows)) {
      $table_rows = intval($table_rows) + 1;
    }
  }

  $categories = "\n<table width=\"".$config['cat_table_width']."\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n<tr>\n<td valign=\"top\" width=\"".$cattable_width."\" class=\"catbgcolor\">\n";
  $categories .= "<table border=\"0\" cellpadding=\"".$config['cat_table_cellpadding']."\" cellspacing=\"".$config['cat_table_cellspacing']."\">\n";
  $count = 0;
  $count2 = 0;
  foreach ($visible_cat_cache as $key => $category_id) {
    $categories .= "<tr>\n<td valign=\"top\">\n";

    $is_new = (isset($new_image_cache[$category_id]) && $new_image_cache[$category_id] > 0) ? 1 : 0;
    $num_images = (isset($cat_cache[$category_id]['num_images'])) ? $cat_cache[$category_id]['num_images'] : 0;

    get_subcat_ids($category_id, $category_id, $cat_parent_cache);

    if (isset($subcat_ids[$category_id])) {
      foreach ($subcat_ids[$category_id] as $val) {
        if (isset($new_image_cache[$val]) && $new_image_cache[$val] > 0) {
          $is_new = 1;
        }
        if (isset($cat_cache[$val]['num_images'])) {
          $num_images += $cat_cache[$val]['num_images'];
        }
      }
    }

    if (defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == 0 || defined("SHOW_RANDOM_CAT_IMAGE") && SHOW_RANDOM_CAT_IMAGE == 0) {
      $random_cat_image_file = "";
    }
    else {
      $random_cat_image_file = get_random_image($category_id, 0, 1);
    }

    $site_template->register_vars(array(
      "cat_id" => $category_id,
      "cat_name" => $cat_cache[$category_id]['cat_name'],
      "cat_description" => $cat_cache[$category_id]['cat_description'],
      "cat_hits" => $cat_cache[$category_id]['cat_hits'],
      "cat_is_new" => $is_new,
      "lang_new" => $lang['new'],
      "sub_cats" => get_subcategories($category_id),
      "cat_url" => $site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$category_id),
      "random_cat_image_file" => $random_cat_image_file,
      "num_images" => $num_images
    ));
    $categories .= $site_template->parse_template("category_bit");
    $count++;
    $count2++;
    $categories .= "</td>\n</tr>\n";

    if ($count == $table_rows && $count2 < sizeof($visible_cat_cache)) {
      $categories .= "</table></td>\n";
      $categories .= "<td valign=\"top\" width=\"".$cattable_width."\" class=\"catbgcolor\">\n";
      $categories .= "<table border=\"0\" cellpadding=\"".$config['cat_table_cellpadding']."\" cellspacing=\"".$config['cat_table_cellspacing']."\">\n";

      $total = $total - $count2;
      $table_columns = $table_columns - 1;
      if ($total <= $table_columns && $table_columns > 1) {
        $table_rows = 1;
      }
      else {
        $table_rows = $total / $table_columns;
        if ($total >= $table_columns && !is_integer($table_rows)) {
          $table_rows = intval($table_rows) + 1;
        }
      }
      $count = 0;
    }
  }

  $categories .= "</table>\n</td>\n</tr>\n</table>\n";
  return $categories;
}
Gruß,
hinzwiekunz

26
Discussion & Troubleshooting / Ok. Vielen Dank
« on: June 20, 2003, 09:56:25 PM »
für deine Hilfe Jan!

27
Discussion & Troubleshooting / Und beim User selber...?
« on: June 20, 2003, 05:30:59 PM »
Vielen Dank Jan, das hilft mir schon weiter. Und wenn nun auch der Admin UND der registrierte Nutzer sein eigenes Profil komplett sehen soll? Alle anderen registrierten und natürlich Gäste sollten ausgeschlossen sein...

Wär das möglich? Sonst mache ich nur Admin....

28
Cr@zy Sash, die Felder sollen doch nicht völlig weg, sondern eben nur für den Benutzer selber und für die Admins erkennbar sein! Dann kann ich sie wohl kaum aus dem Template entfernen.
 :arrow:  Eigentlich suche ich nach einer Stelle wo Berechtigungen für Felder  zugeteilt sind,  wie beim "Control-Link" der nur erscheint wenn man als Admin eingeloggt ist!!!

29
Ja, wenn man bei dem FEld der aktiven Nutzer klickt, erscheint das Kontrollzentrum - selbst ersichtlich für außenstehende, oder? Ich habe das an einem Rechner mit zwei Browsern jedenfalls so getestet. Die registtrierten, aktiven Nutzer werden angezeigt und bei Mausklick erscheint das Kontrollzentrum mit den Angaben zu dem Nutzer. Dort sind dann auch meine neuen Felder ´, die ich aber gern für Außenstehende geheim halten würde...

30
Hallo, ersteinmal haben mir die Beiträge hier:

http://www.4homepages.de/forum/viewtopic.php?t=747

sehr beim erstellen von Feldern geholfen, denn bei mir hat es nach langer Zeit geklappt Felder hinzuzufügen. Nur fällt mir jetzt auf, das alle neuen Felder bei Neuregistrierten Nutzern für Fremde über das Kontrollzentrum ersichtlich sind - z.B. durch klick auf den Namen "Wer online ist".  

Ich möchte das die neuen Angaben wie Adresse u.Ä. nur dem Nutzer selbst und den Administratoren zugänglich sind!!! Wo muss ich die Angaben da hinschreiben, was muss ich modifizieren??????

Gruß,
hinzwiekunz

Pages: 1 [2] 3 4