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

Pages: [1]
1
How change the url and img src path to absolute path gallery.site.ru ?

I try to change this code in functions.php

Code: [Select]
//--External thumbnails--------------------------------
function get_thumbnail_extern_code($media_file_name, $thumb_file_name = "", $image_id, $cat_id, $image_name = "", $mode = "", $show_link = 1, $open_window = 1) {
  global $site_sess, $config;

  if (!check_media_type($media_file_name)) {
    $thumb = "<img src=\"".ICON_PATH."/404.gif\" border=\"0\" alt=\"\" />";
  }
  else {
    if (!get_file_path($thumb_file_name, "thumb", $cat_id, 0, 0)) {
      $file_src = ICON_PATH."/".get_file_extension($media_file_name).".gif";
      $image_info = @getimagesize($file_src);
      $width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";
      $thumb = "<img src=\"".$file_src."\" border=\"0\"".$width_height." alt=\"".$image_name."\" />";
    }
    else {
      $file_src = get_file_path($thumb_file_name, "thumb", $cat_id, 0, 1);
      $image_info = @getimagesize($file_src);
      $width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";
      $thumb = "<img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" />";
    }
  }

  if ($show_link) {
    if ($open_window) {
      $thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".$thumb."</a>";
    }
    else {
      $thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\">".$thumb."</a>";
    }
  }
  return $thumb;
}

//--End external thumbnails----------------------------

But it works even without this code in functions.php 8O 8O

2
Dont work :(
In html code gallery

Code: [Select]
<a href="./categories.php?cat_id=10"><img src="" border="1"></a>
No link to image src


Here is my category_bit.html  code
 
Code: [Select]
<div class="maincat"><img src="{template_url}/images/folder.png" width="20" height="18" alt="" />
  <a href="{cat_url}">{cat_name}</a>
      {if cat_is_new}<sup class="new">{lang_new}</sup>{endif cat_is_new}</div>
{if sub_cats}{sub_cats}{endif sub_cats}

{if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file}

3
Discussion & Troubleshooting / Re: How i get a current user ID ?
« on: December 20, 2009, 09:34:46 PM »
Thanks, its works  :D

One more questions. I need a show some content only for admin
Something like this:

<if current user =admin>
content
</if>

4
Discussion & Troubleshooting / How i get a current user ID ?
« on: December 20, 2009, 12:59:24 PM »
I need to get current user ID, and paste it to template like member.php?id=$current_user_id

5
Why watermark not transparent? I use transparent png  :(

6
Dont work jupload  :(

Quote
Java Plug-in 1.6.0_11
Using JRE version 1.6.0_11 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Admin
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------


20.12.2009 0:56:00 JUpload.startup <init>
INFO: startup()
20.12.2009 0:56:00 JUpload.startup init
INFO: init()
20.12.2009 0:56:00 JUpload.startup start
INFO: start()
20.12.2009 0:56:00 JUpload.startup jsIsReady
INFO: JavaScript call: jsIsReady()
20.12.2009 0:56:00 JUpload.utilities.e <clinit>
INFO: User preferences created: C:\Documents and Settings\Admin\.jupload.properties
20.12.2009 0:56:00 JUpload.swingVersion.JUpload init
INFO: JUpload initializing
JUpload v0.88 at xxx: sitexxx: /
20.12.2009 0:56:01 JUpload.swingVersion.r <init>
INFO: Creating file system view
20.12.2009 0:56:01 JUpload.utilities.e G
INFO: Number of preselected files: 0
netscape.javascript.JSException: Unspecified error invoking method or accessing property "AddedListener"
   at sun.plugin2.main.client.MessagePassingJSObject.newJSException(Unknown Source)
   at sun.plugin2.main.client.MessagePassingJSObject.waitForReply(Unknown Source)
   at sun.plugin2.main.client.MessagePassingJSObject.call(Unknown Source)
   at JUpload.swingVersion.g.a(Unknown Source)
   at JUpload.swingVersion.JUpload.init(Unknown Source)
   at JUpload.swingVersion.JUpload.<init>(Unknown Source)
   at JUpload.startup.start(Unknown Source)
   at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Exception: netscape.javascript.JSException: Unspecified error invoking method or accessing property "AddedListener"
20.12.2009 0:56:33 JUpload.startup <init>
INFO: startup()
20.12.2009 0:56:33 JUpload.startup init
INFO: init()
20.12.2009 0:56:33 JUpload.startup start
INFO: start()
20.12.2009 0:56:33 JUpload.swingVersion.JUpload init
INFO: JUpload initializing
JUpload v0.88 at xxx: sitexxx: /
20.12.2009 0:56:33 JUpload.swingVersion.r <init>
INFO: Creating file system view
20.12.2009 0:56:34 JUpload.utilities.e G
INFO: Number of preselected files: 0
netscape.javascript.JSException: No registered plugin for applet ID 1
   at sun.plugin2.main.client.MessagePassingJSObject.newJSException(Unknown Source)
   at sun.plugin2.main.client.MessagePassingJSObject.waitForReply(Unknown Source)
   at sun.plugin2.main.client.MessagePassingJSObject.call(Unknown Source)
   at JUpload.swingVersion.g.a(Unknown Source)
   at JUpload.swingVersion.JUpload.init(Unknown Source)
   at JUpload.swingVersion.JUpload.<init>(Unknown Source)
   at JUpload.startup.start(Unknown Source)
   at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Exception: netscape.javascript.JSException: No registered plugin for applet ID 1

7
I have a problem. My Mysql server use default character utf-8, and I use the cp1251 character
How do I prescribe in a script, equating to character cp1251?

This example  for the forum vb
mysql_query ("set character_set_client='cp1251'");
mysql_query ("set character_set_results='cp1251'");
mysql_query ("set collation_connection='cp1251_general_ci'");

P.S sorry for my bad English  :oops:

Pages: [1]