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

Pages: 1 ... 33 34 35 36 [37] 38
541
Did you try to search? ;)

Is Members Personal Category the MOD you're looking for?

542
Spezielle Tools gibt es... z.B. Notepad ;)

Die Templates kannst Du (dank der {} Tags) leider nicht mit einem WYSIWYG-Editor bearbeiten und musst dich schon durch den HTML-Code durchbeissen...
Solange Du dir kein eigenes 4images-Template-Bearbeitungsprogram schreibst ;)


543
Ein Schritt weiter ist besser, als kein Schritt weiter :)

Da haben wir wohl GD 1.6 ;)

Öffne /includes/constants.php

suche dort nach einer Zeile, wo GD2 steht und setze dort statt 1 eine 0

Dürfte danach laufen...

Have fun

544
ad 1)
recht einfach, wenn du etwas HTML verstehst... kopiere einfach alle Dateien aus templates/default/*
z.B. nach templates/neu/*
die Dateien dann nur noch editieren...
im Admin-Bereich dann einfach das Template "neu" einstellen - fertig ;)

ad 2)
Für die Suchfunktion lösche aus den Template-Dateien dies:
Code: [Select]
<input type="text" name="search_keywords" size="15" class="searchinput" />
Code: [Select]
<input type="submit" value="{lang_search}" class="button" name="submit" />
Code: [Select]
<a href="{url_search}" class="smalltext">{lang_advanced_search}</a>
und ändere den herumliegenden HTML-Code...
Kategorien:
Erstelle nur 1 Kategorie... ;)
Für mehr als das, wären Eingriffe in den PHP-Code nötig :(

545
GD is Standardausrüstung vieler PHP-Distributionen.

Die Auto-Thumbnail-Geschichte bewältigst Du am besten, wenn Du im Admin-Bereich auf "Einstellungen" gehst und dort
unter "Allgemeine Einstellungen"
* Modul zum Erstellen der Thumbnail-Bilder auf GD Bibliothek stellst
unter "Upload Einstellungen"
* Automatisch Thumbnails erstellen auf Ja stellst
* Größe der längsten Seite des erstellten Thumbnails in Pixel so einstellst, wie Du für richtig hälst...
* dann noch Proportionen und Bild-Qualität des erstellten Thumbnails einstellen und fertig ist es...

Falls Du Fragen zur Installation der GD-Bibliothek hast - suche doch erst hier> http://www.boutell.com/gd/

have fun

546
ummm... thank you V@no...
I did repost it, but forgot to answer baseline's question  :oops:

547
Originally posted by / Author: V@no

----- [ Overview ] -----

This mod will alow your members upload their photo that will be displayed in their profile.


----- [ Changed Files ] -----

member.php

includes/db_field_definitions.php
lang/<yourlanguage>/main.php
lang/<yourlanguage>/admin.php
admin/settings.php
admin/users.php
templates/<yourtemplate>/member_editprofile.html
templates/<yourtemplate>/member_profile.html
[/color]

----- [ New Files ]-----

userpic_install.php


----- [ New Folder ] -----

data/userpic/



----- [ Installation ] -----

Step 1
Open member.php
Find:

Code: [Select]
     "user_homepage_button" => $user_homepage_button,
Insert above:
Code: [Select]

//User Pic
      "userpic_img" => ($config['userpic'] && $user_row['userpic']) ? ROOT_PATH."data/userpic/".$user_row['userpic'] : "",
//End User Pic


Step 1.1
Find:

Code: [Select]
 if (!$error && $user_email != $user_info['user_email'] && $user_info['user_level'] != ADMIN && $config['account_activation'] != 0) {
Insert above:
Code: [Select]
// Upload User Pic
  $userpic = $userpic_new = "";
  if (!$error && $config['userpic'])
  {
    $userpics_dir = ROOT_PATH."data/userpic/";
    if (!empty($HTTP_POST_FILES['userpic_file']['tmp_name']) && $HTTP_POST_FILES['userpic_file']['tmp_name'] != "none")
    {
      if (isset($HTTP_COOKIE_VARS['userpic_file']) || isset($HTTP_POST_VARS['userpic_file']) || isset($HTTP_GET_VARS['userpic_file'])) {
        die("Security violation");
      }
      if (!function_exists("is_uploaded_file")) {
        function is_uploaded_file($file_name) {
          if (!$tmp_file = @get_cfg_var('upload_tmp_dir')) {
            $tmp_file = tempnam('','');
            $deleted = @unlink($tmp_file);
            $tmp_file = dirname($tmp_file);
          }
          $tmp_file .= '/'.basename($file_name);
          return (ereg_replace('/+', '/', $tmp_file) == $file_name) ? 1 : 0;
        }
      
        function move_uploaded_file($file_name, $destination) {
          return (is_uploaded_file($file_name)) ? ((copy($file_name, $destination)) ? 1 : 0) : 0;
        }
      }
      $error = array();
      $extensions = array(
        "jpg",
        "jpeg",
        "gif",
        "png"
      );
      $mime_types = array();
      $mime_type_match = array();
      include_once(ROOT_PATH.'includes/upload_definitions.php');
      foreach($extensions as $val)
        $mime_types = array_merge($mime_types, $mime_type_match[$val]);
      $mime_types = array_unique($mime_types);
      $userpic_ext = strtolower(substr(strrchr($HTTP_POST_FILES['userpic_file']['name'],"."), 1));
      $userpic_mime = $HTTP_POST_FILES['userpic_file']['type'];
      if (!in_array($userpic_mime, $mime_types) || !in_array($userpic_ext, $extensions))
      {
        $error[] = $lang['invalid_file_type']. " (".$userpic_ext.", ".$HTTP_POST_FILES['userpic_file']['type'].")";
      }
      if ($HTTP_POST_FILES['userpic_file']['size'] > $config['userpic_size'] * 1024)
      {
        $error[] = $lang['invalid_file_size'];
      }
      if (empty($error))
      {
        $userpic_name = $user_info['user_id'].".".$userpic_ext;
        $userpic_file = $userpics_dir.$userpic_name;
         if (file_exists($userpic_file))
         {
            unlink($userpic_file);
        }
        if (!move_uploaded_file($HTTP_POST_FILES['userpic_file']['tmp_name'], $userpic_file))
        {
          $error[] = $lang['file_copy_error'];
        }
        else
        {
          @chmod($userpic_file, CHMOD_FILES);
        }
      }
      if (empty($error))
      {
        $userpic = $HTTP_POST_VARS['userpic'] = $userpic_new = $userpic_name;
        if ($user_info['userpic'] != $userpic_name && file_exists($userpics_dir.$user_info['userpic']))
        {
          @unlink($userpics_dir.$user_info['userpic']);
        }
        if (!function_exists(init_convert_options))
        {
          require(ROOT_PATH.'includes/image_utils.php');
        }
        $image_info = getimagesize($userpic_file);
        $convert_options = init_convert_options();
        if (($image_info[0] > $config['userpic_width'] || $image_info[1] > $config['userpic_height']))
        {
          if ($convert_options['convert_error'] || (!$convert_options['convert_error'] && !resize_image($userpic_file, 85, $config['userpic_width'], 1, $config['userpic_height'])))
          {
            if ($image_info[0] > $config['userpic_width'])
            {
              $error[] = $lang['invalid_image_width'];
            }
            if ($image_info[1] > $config['userpic_height'])
            {
              $error[] = $lang['invalid_image_height'];
            }
          }
        }
      }
      if (!empty($error))
      {
        $msg .= (($msg != "") ? "<br />" : "")."<b>".$lang['file_upload_error'].": ".$HTTP_POST_FILES['userpic_file']['name']."</b><br />";
        foreach ($error as $val) {
          $msg .= "<b>".$HTTP_POST_FILES['userpic_file']['name'].":</b> ".$val."<br />";
        }
        $HTTP_POST_VARS['userpic'] = $user_info['userpic'];
      }
    }
    else
    {
      if (isset($HTTP_POST_VARS['userpic_del']) && $HTTP_POST_VARS['userpic_del'])
      {
        @unlink($userpics_dir.$user_info['userpic']);
        $HTTP_POST_VARS['userpic'] = $userpic = "";
        $userpic_new = 1;
      }
    }
  }
// End Upload User Pic


Step 1.2
Find:
Code: [Select]
   "user_showemail_yes" => $user_showemail_yes,
Insert above:
Code: [Select]
//User Pic
    "userpic_allowed" => $config['userpic'],
    "userpic_img" => ($user_info['userpic']) ? ROOT_PATH."data/userpic/".$user_info['userpic'] : "",
    "lang_userpic_del" => $lang['userpic_del'],
    "lang_userpic_upload" => preg_replace("/".$site_template->start."userpic_max_size".$site_template->end."/siU", $config['userpic_size']."&nbsp;".$lang['kb'], preg_replace("/".$site_template->start."userpic_max_width".$site_template->end."/siU", $config['userpic_width'], preg_replace("/".$site_template->start."userpic_max_height".$site_template->end."/siU", $config['userpic_height'], $lang['userpic_upload']))),
    "userpic_max_width" => $config['userpic_width'],
    "userpic_max_height" => $config['userpic_height'],
    "userpic_max_size" => $config['userpic_size']."&nbsp;".$lang['kb'],
//End User Pic



Step 2
Open includes/db_field_definitions.php
At the end, above closing ?> insert:
Code: [Select]
$additional_user_fields['userpic'] = array($lang['userpic'], "text", 0);


Step 3
Open lang/<yourlanguage>/main.php
At the end, above closing ?> insert:

Code: [Select]
//-----------------------------------------------------
//--- User Pic ----------------------------------------
//-----------------------------------------------------
$lang['userpic'] = "Personal picture";
$lang['userpic_del'] = "Remove";
$lang['userpic_upload'] = "Maximum image size: {userpic_max_size}.<br />Image larger {userpic_max_width}x{userpic_max_height} will be resized";
$lang['file_copy_error'] = "Copy error. Please check the directory permissions.";
//--- End User Pic ------------------------------------



Step 4
Open lang/<yourlanguage>/admin.php
At the end, above closing ?> insert:
Code: [Select]
//User Pic
/*-- Setting-Group Member Personal Photo --*/
$setting_group['memberpersonalphoto']="Personal Picture";
$setting['userpic'] = "Activate";
$setting['userpic_size'] = "Max. image size in KB";
$setting['userpic_width'] = "Max. image width in pixel";
$setting['userpic_height'] = "Max. image height in pixel";
//End User Pic



Step 5
Open admin/settings.php
Find:
Code: [Select]
 show_form_footer($lang['save_changes'], "", 2);
Insert above:
Code: [Select]
//User Pic
  show_table_separator($setting_group['memberpersonalphoto'], 2, "setting_group_memberpersonalphoto");
  show_setting_row("userpic", "radio");
  show_setting_row("userpic_width");
  show_setting_row("userpic_height");
  show_setting_row("userpic_size");
//End User Pic



Step 6
Open templates/<yourtemplate>/member_editprofile.html
Find:
Code: [Select]
<form method="post" action="{url_member}">
Replace it with:
Code: [Select]
<form method="post" action="{url_member}" enctype="multipart/form-data">
or just make sure that enctype="multipart/form-data" is present inside the <form> tag.


Step 6.1
Find:
Code: [Select]
         <tr>
            <td class="row2"><b>{lang_icq}</b></td>
            <td class="row2"><input type="text" name="user_icq"  size="30" value="{user_icq}" class="input" /></td>
          </tr>

Insert below:
Code: [Select]
{if userpic_allowed}
          <tr>
            <td class="row1" valign="top"><b>{lang_userpic}</b>
              <SPAN class="smalltext">
                <br />
                <B>{lang_userpic_upload}</B>
              </SPAN>
            </td>
            <td class="row1">
              <INPUT type="file" name="userpic_file"  size="30" class="input" /><br />
              {if userpic_img}<img src="{userpic_img}"><br /><input type="checkbox" name="userpic_del" value="1">&nbsp;{lang_userpic_del}{endif userpic_img}
            </TD>
          </TR>
{endif userpic_allowed}
(ofcourse u can add it anywhere u want in this file)



Step 7 updated 28.6.2006
Open templates/<yourtemplate>/member_profile.html
Find:
Code: [Select]
       <tr>
          <td class="row2"><b>{lang_icq}</b></td>
          <td class="row2">{if user_icq}<a href="http://wwp.icq.com/scripts/search.dll?to={user_icq}">{user_icq}</a> (<b>{user_icq_status}</b>){endif user_icq}</td>
        </tr>

Replace with:
Code: [Select]
       <tr>
          <td class="row2"><b>{lang_icq}</b></td>
          <td class="row2">{if user_icq}<a href="http://www.icq.com/people/about_me.php?uin={user_icq}">{user_icq}</a> (<b>{user_icq_status}</b>){endif user_icq}</td>
        </tr>
{if userpic_img}
        <tr>
          <td class="row1" valign="top"><b>{lang_userpic}</b></td>
          <td class="row1"><img src="{userpic_img}"></td>
        </tr>
{endif userpic_img}



Step 8
Create a new folder: data/userpic/
Set CHMOD 777 (unix systems only) and make sure its writible by your webserver.



Step 9
Download this package, extract it and upload to your 4images root directory, then execute it by typing in your browser: http://<your_site_address_and_path_to_your_4images>/userpic_install.php
Follow the instructions.

Or u can update your database manualy by executing this MySQL query:
Code: [Select]
ALTER TABLE `4images_users` ADD `userpic` varchar(255) NOT NULL default '';
INSERT INTO `4images_settings` ( `setting_name` , `setting_value` ) VALUES ('userpic', '1');
INSERT INTO `4images_settings` ( `setting_name` , `setting_value` ) VALUES ('userpic_size', '500');
INSERT INTO `4images_settings` ( `setting_name` , `setting_value` ) VALUES ('userpic_width', '200');
INSERT INTO `4images_settings` ( `setting_name` , `setting_value` ) VALUES ('userpic_height', '200');



Step 10
Step 10 and 11 required if your would like display members photos on their images details page (details.php)
Open details.php
Find:
Code: [Select]
$additional_sql = "";Insert below:
Code: [Select]
if (!empty($additional_user_fields)) {
  foreach ($additional_user_fields as $key => $val) {
    $additional_sql .= ", u.".$key;
  }
}
(if this block of code is already present in details.php, then u dont need doublicate it ;))



Step 11
Open includes/functions.php
Find:
Code: [Select]
 if (!empty($additional_image_fields)) {Insert above:
Code: [Select]
 if (!empty($additional_user_fields)) {
    $additional_field_array = array();
    foreach ($additional_user_fields as $key => $val) {
      if ($key != "userpic" || ($key == "userpic" && $config['userpic']))
      {
        $additional_field_array[$key] = (!empty($image_row[$key])) ? format_text($image_row[$key], 1) : REPLACE_EMPTY;
        $additional_field_array['lang_'.$key] = $val[0];
      }
    }
    if (!empty($additional_field_array)) {
      $site_template->register_vars($additional_field_array);
    }
  }

Now you can use {userpic} in details.html template.



Step 12
This steps 12 - 13 are required if you would like show members photos in their comments.
Open details.php
Find:
Code: [Select]
$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq")."Replace it with:
Code: [Select]
 $sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").", u.userpic

Step 12.1
Find:
Code: [Select]
       "comment_user_ip" => $comment_user_ip,Insert below:
Code: [Select]
       "comment_userpic" => ($config['userpic'] && $comment_row[$i]['userpic']) ? ROOT_PATH."data/userpic/".$comment_row[$i]['userpic'] : "",


Step 13
Insert in templates/<your_template>/comment_bit.html (whereever u want the member's pic to be displayed. Design is your job ;))
Code: [Select]
{if comment_userpic} <img src="{comment_userpic}">{endif comment_userpic}


Step 14
In admin/users.php find:
  $sql "SELECT ".get_user_table_field("""user_id").get_user_table_field(", ""user_name")."
          FROM "
.USERS_TABLE."
          WHERE "
.get_user_table_field("""user_id")." IN ($user_ids)";
  
$user_result $site_db->query($sql);
  
$image_ids_sql "";
  while (
$user_row $site_db->fetch_array($user_result)) {
    
$user_id $user_row[$user_table_fields['user_id']];
    
$user_name $user_row[$user_table_fields['user_name']];


Replace with:
  $sql "SELECT ".get_user_table_field("""user_id").get_user_table_field(", ""user_name").", userpic
          FROM "
.USERS_TABLE."
          WHERE "
.get_user_table_field("""user_id")." IN ($user_ids)";
  
$user_result $site_db->query($sql);
  
$image_ids_sql "";
  while (
$user_row $site_db->fetch_array($user_result)) {
    
$user_id $user_row[$user_table_fields['user_id']];
    
$user_name $user_row[$user_table_fields['user_name']];
    if (
$user_row['userpic'] && file_exists(ROOT_PATH."data/userpic/".$user_row['userpic']) && is_file(ROOT_PATH."data/userpic/".$user_row['userpic']))
    {
      
unlink(ROOT_PATH."data/userpic/".$user_row['userpic']);
    }


----- [ Addons ] -----

[/list]


----- [ Version History ] -----

1.1.3 (2011-10-23)
    - Updated step 1.1, 4 and 5

1.1.2
    - Added Step 14 that deletes user personal photos when user is deleted. (Thanks to alekinna)

1.1.1
    - Fixed some tags not being displayed in the edit profile (redo Step 1.2)

1.1
    - Added optional Steps 10 - 13

1.0
    - Original release

548
Chit Chat / Re: old posts!
« on: March 15, 2005, 05:46:00 PM »
if it is inside the range of 62.231.12.0 - 62.231.12.255 then it would not be so "far away"  :wink:
if it is outside this range, but IP assigned to a russian dial-up provider... then it could just mean, that Mr. StarSumIQ is using different dial-up providers...   :)

but that's just pure speculation...  8)

549
Cant Find a Upload Button in the lightbox

That's OK.
You did not do anything wrong.
The Lightbox is not a "personal category".
It is just something like the "Favourites" Tab of your browser - you do not upload any picture, you just set if the picture has to be shown in your lightbox...

That's it...

550
is there a way to see the flags on the whos_online.html ?
sure  :wink:
did you read through the posts?

Um, does this mod have something to do with the way you got the flags to be listed for whos currently online in the home page (not admin control panel)on your website?
yes, its based on this too. Maybe in time I'll post it too ;)

551
Vincent, that's not really exact - a lot of IP's are assigned to an ISP ;) and this Internet Service Provider provides this internet service in a certain country ;)
if you check 83.148.16.15 there's a 95 % chance that the user comes from the Czech Republic or if you'll search for 148.120.16.15 it in 95 cases of 100 it could be a visitor from Norway...
 8)



2 V@no: Great thing! It works fine. Thank you for this mod again  :lol:
I'm looking forward to see your next mod   :wink:

552
Chit Chat / Re: old posts!
« on: March 14, 2005, 09:38:52 PM »
nice to "see you smiling" again Chris ;)

553
wonderful! I like that!

I guess I'll implement that tonight  :)

Thank you V@no  :D


554
Mods & Plugins (Requests & Discussions) / Re: Mod for Short URL?
« on: March 14, 2005, 04:05:29 PM »
everything is possible,
but I guess the few people who are able to do that (because they know what to change in 4images) are a somehow overwhelmed now...
:(

555
Chit Chat / Re: old posts!
« on: March 14, 2005, 03:58:37 PM »
mmmm...u know something we dont know?

no ;)

just try to search for the words hacked (or hack) and Wizi via google.com and you'll find a few threads on other PHPBB boards hacked the "same way" with the same f*****g text "Hacked by Wizi!" and some additional information about that in russian like "I hacked this site for the second time and now in only 20 minutes" and similar...
on some polish board (also hacked, but it looks like if they had good back-ups) is a thread about that also... they said, that Wizi's IP was 62.231.12.14
But I guess this is more a speculation, than a fact..

From all these links and information I just can guess, that Mr. Wizi is a handicapped and simple person with a sick mind who did read somewhere about the PHPBB security exploit and who's now searching all over the web for PHPBB Boards with the affected version of PHPBB to "hack 'em"... But this is just my humble opinion - maybe Wizi is a very nice guy with an IQ reaching the sum of the stars in the sky and he's doing this to make this world a better place...


Pages: 1 ... 33 34 35 36 [37] 38