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

Pages: 1 2 3 4 [5]
61
Quote
wie und wo kann man die background-farben der einzelnen rows ändern? (siehe fragezeichen)
-----------
how and where can i change the background colours of the rows? (look for "?")

in your *.css file (in your templates directory) - - look for
".head2"  & ".imagerow"  and change the colors there. 

some online CSS hex color charts are here: (can use either the 6-character number/letters or the named colors like "crimson", etc.):
http://www.mandarindesign.com/color.html

or create a whole new color scheme here:
Graffi's color schemer place



62
V@no - this seems to "expire" after cookies are deleted - seems like there was another "disable rating after vote" thing I used before that just posted a message "Sorry, but you've already voted..."

here's my code from page_header.php:
Code: [Select]
/* //-----------------------------------------------------
//--- Save Rating -------------------------------------
//-----------------------------------------------------
if ($action == "rateimage" && $id) {
  $rating = intval($HTTP_POST_VARS['rating']);
if ($user_info['user_level'] != GUEST) {
$voted_array = array();
if (!empty($user_info['user_voted'])) {
$voted_array = explode(" ", $user_info['user_voted']);
}
$list_rated = array();
foreach ($voted_array as $key) {
$split = explode(",", $key);
$list_rated[] = $split[0];
if ($id == $split[0]) {
$rating = $split[1];
}
}
$rated = in_array($id, $list_rated);
}else{
$rated = FALSE;
}
  $cookie_name = (defined("COOKIE_NAME")) ? COOKIE_NAME : "4images_";
  $cookie_rated = isset($HTTP_COOKIE_VARS[$cookie_name.'rated']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name.'rated'])) : array();
  if ($rating && $rating <= MAX_RATING && $id) {
    if (!isset($session_info['rated_imgs'])) {
      $session_info['rated_imgs'] = $site_sess->get_session_var("rated_imgs");
    }   
    $split_list = array();
    if (!empty($session_info['rated_imgs'])) {
      $split_list = explode(" ", $session_info['rated_imgs']);
    }
    if (!in_array($id, $split_list) && !in_array($id, $cookie_rated) && !$rated) {

      $session_info['rated_imgs'] .= " ".$id;
      $session_info['rated_imgs'] = trim($session_info['rated_imgs']);
      $site_sess->set_session_var("rated_imgs", $session_info['rated_imgs']);
      $cookie_rated[] = $id;
      $cookie_expire = time() + 60 * 60 * 24 * 4;
      setcookie($cookie_name.'rated', serialize($cookie_rated), $cookie_expire, COOKIE_PATH, COOKIE_DOMAIN, COOKIE_SECURE);
      update_image_rating($id, $rating);
      $msg = $lang['voting_success'];
    }
    else {
      $msg = $lang['already_voted'];
    }
  }
  else {
    $msg = $lang['voting_error'];
  }
}  */
//-----------------------------------------------------
//--- Save Rating -------------------------------------
//-----------------------------------------------------

//----- Settings ------------

//change to $rate_suffix = ""; if u dont want remmber votes for different users on same computer
$rate_suffix = "_".$user_info['user_id'];

//--- End Settings ----------

if ($action == "rateimage" && $id) {
  $rating = intval($HTTP_POST_VARS['rating']);
  $cookie_name = (defined("COOKIE_NAME")) ? COOKIE_NAME : "4images_";
  $cookie_rated_array = isset($HTTP_COOKIE_VARS[$cookie_name.'rated'.$rate_suffix]) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name.'rated'.$rate_suffix])) : array();
  if ($rating && $rating <= MAX_RATING && $id) {
    if (!isset($session_info['rated_imgs'.$rate_suffix])) {
      $session_info['rated_imgs'.$rate_suffix] = $site_sess->get_session_var("rated_imgs".$rate_suffix);
    }
    $split_list_array = array();
    if (!empty($session_info['rated_imgs'.$rate_suffix])) {
      $split_list_array = explode(" ", $session_info['rated_imgs'.$rate_suffix]);
    }
    $split_list = array();
    foreach ($split_list_array as $key) {
      $key = explode(",", $key);
      $split_list[] = $key[0];
    }
    $cookie_rated = array();
    foreach ($cookie_rated_array as $key) {
      $key = explode(",", $key);
      $cookie_rated[] = $key[0];
    }
    if (!in_array($id, $split_list) && !in_array($id, $cookie_rated)) {
      $session_info['rated_imgs'.$rate_suffix] .= " ".$id.",".$rating;
      $session_info['rated_imgs'.$rate_suffix] = trim($session_info['rated_imgs'.$rate_suffix]);
      $site_sess->set_session_var("rated_imgs".$rate_suffix, $session_info['rated_imgs'.$rate_suffix]);
      $cookie_rated_array[] = $id.",".$rating;
      $cookie_expire = time() + 60 * 60 * 24 * 4;
      setcookie($cookie_name.'rated'.$rate_suffix, serialize($cookie_rated_array), $cookie_expire, COOKIE_PATH, COOKIE_DOMAIN, COOKIE_SECURE);
      update_image_rating($id, $rating);
      $msg = $lang['voting_success'];
    }
    else {
      $msg = $lang['already_voted'];
    }
  }
  else {
    $msg = $lang['voting_error'];
  }
}

//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------

I simply commented out what was already there and added this new code - - but users can still vote again the next day - - is this one based on cookies?

thx -

63
this works well - but I have a question -

I'd like to use this MOD on thumbnails wherever they appear in the site for certain categories - in random images, new images, top images, etc. - sort of like:

Code: [Select]
if this image is in this category or any sub-category, use this thumbnail_bit template;
if this image is in any other category, use the regular template

Basically, I'm trying to hide uploader's username for certain cats - - -

thanks in advance... :?

64
categories works well - however, the Details pages don't "take" -

Quote
If you want to use a different template for the details page , do step 2 for "details.php". Then create a new template for the details page (you may duplicate "details.html" and modify it) an save it under this name:

Code:
details_<cat_id>.html
Replace <cat_id> with id of the category.
This category and all subcategories will now use this template for the details page.

basically, I want to hide the "uploaded by" lines in certain categories in the Details pages. When I  make the change mentioned above, create my new template and upload, *all* details pages are using the new template...

Anything I missed  :?:?:idea:  :?:

65
I'm looking for a way to allow users to update their images, rather than just uploading a new image. If they make changes or edits to an image and just want to update the already-uploaded one, they can't.

If I (as Admin) click [edit], I have the option of uploading a new image to replace the one there - I can't find the permission line that would allow a user to update their own image -

Maybe somewhere here in member.php:
Code: [Select]
if (!$comment_row || $comment_row['user_id'] <= USER_AWAITING || ($config['user_delete_comments'] != 1 && $user_info['user_level'] != ADMIN && $user_info['user_cat'] != $image_row['cat_id']) || ($user_info['user_id'] != $comment_row['user_id'] && $user_info['user_level'] != ADMIN && $user_info['user_cat'] != $comment_row['cat_id'])) {
    show_error_page($lang['no_permission']);

help, anyone?    :?:   thx....

66
had no problems - thanks!

67
OK - here's what I did (and it works great!)

for the sql statement I mentioned above - the one previously altered with the "paging in comments" MOD - I simply added
Code: [Select]
u.userpicimmediately after
Code: [Select]
c.comment_ip,so it now looks like this
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, u.userpic, 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").$additional_sql."

basically, the only thing added to the sql statement is the "u.userpic, " part - which can be added anywhere inside that blurb. MAKE SURE YOU MATCH THE "," SEQUENCE ALREADY PRESENT. If you manage that, you're good to go.

for use in header.html, I'll mess with it - - unless someone else jumps in first.

many thanks again - this is easier (I think, anyway) to implement than the avatar MOD - and works just as well.

68
Quote
cant get id of image I think, because link to img not finished. .../
what is it looking for?  what path?  You may be able to use {userpic_img} instead, as in member_profile.html


Quote
Step 12
This steps 12 - 13 are required if you would like show members photos in their comments.
Open details.php
Find:
Code:
$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:
  $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

V@no -  I've added the "paging in comments" MOD previously, so the above sql statement is commented out in my details.php.  Instead, I have
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").$additional_sql."
gonna try in a bit to see if they work as well (I need to go through the code & see what it's looking for... 8O)

Thanks for the cool addition!

69
you *should* be able to use {userpic} in the header, wherever you want it - - - try it and see (didn't test it either  :oops:)


70
Quote
but without this line, u should be able use {userpic} tag in the template. (not {userpic_img} )
DOH!!!!   :oops:

getting closer - - - !

in functions.php, find
Code: [Select]
"user_id" => $image_row['user_id'],
    "user_name" => $user_name,

below it, add
Code: [Select]
//User Pic
      "userpic" => ($config['userpic'] && $image_row['userpic']) ? ROOT_PATH."data/userpic/".$image_row['userpic'] : "",
//End User Pic

Then you can call the tag {userpic} in details.html wherever you want it - I put it here:
Code: [Select]
  <tr>
<td valign="top" class="row1"><b>{lang_added_by}</b></td>
<td valign="top" class="row1">{user_name_link}&nbsp;&nbsp;&nbsp;&nbsp;{if userpic} <img src="{userpic}" align="absmiddle">
{endif userpic}</td>
  </tr>

Commenting is still a little quirky, though.  Adding the {userpic} tag in comment_form.html and comment_bit.html doesn't grab the commenter's userpic - instead, it repeats the same userpic from the uploader's profile  (if they have one)

So user1 uploads an image and has his userpic in the details section.  User2 also has a userpic and wants to leaave a comment - the comment box shows user1's userpic.

Not sure about the syntax, but somewhere should be
Code: [Select]
$comment_user_userpic = "";and then also
Code: [Select]
"comment_userpic" => ($config['comment_userpic']..........
Many thanks - this is getting close!   8)

71
Quote
Code:
  if (!empty($additional_image_fields)) {
    $additional_field_array = array();
    foreach ($additional_image_fields as $key => $val) {
      $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);
    }
  }

this was already in details.php from an earlier MOD (somewhere....  :? )  so I didn't add it again.

Now I just need to tell details to look in the data/userpic folder - currently, I'm getting broken images that point to the root directory. Even hard-coding in the template "data/userpic/{userpic_img}"  doesn't do it - it's not finding which userpic to insert....  8O

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

should be somewhere in details.php or functions.php  (  :?: )

BTW, ascanio, I'm using
Code: [Select]
{if userpic_img} <img src="{userpic_img}" align="absmiddle">
{endif userpic_img}
to add the image - - that way if a user doesn't have an image yet, it won't show a broken image - - or a guest won't show a broken image (even though it DOES currently show a broken image for everyone !) 

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

 somewhere in either details.php or functions.php , the broken images disappear - but so does the userpic that's SUPPOSED to be there (mine - I'm testing locally, so I can't send a link  :?)

V@no, does this make sense??  Now I'm confused..   8O

SUMMARY:  Details doesn't know where to find the userpic - how do I tell it where to look?

72
trying to "convert" this to an easy avatar mod, with the user's image showing up wherever their user name shows up, like on what images they've uploaded & comments they've made.

I can't simply plug in the {userpic_img} tag in my templates because details.php doesn't recognize it - so I get a broken image....

What & where in details.php would I need to add something like  $config['userpic']  etc.... ?

thanks for any tips - -

Pages: 1 2 3 4 [5]