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.


Topics - MrAndrew

Pages: 1 2 3 [4]
46
Discussion & Troubleshooting / Listing News
« on: March 29, 2010, 03:59:46 PM »
I`m sorry, but i don`t know where it post. I find interest news for my gallery, and i think that it may be nterest for anybody.

This news have another view then MOD News ticker and News

Step1. Put next code to you template where you want to be news

Code: [Select]
<TD BGCOLOR="#e2e0e0">

<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="100%">

<TR>

<TD align="center" BGCOLOR="#e2e0e0" style="border-top: 1.0pt inset #474171; border-left: 1.0pt inset #474171; border-right: 1.0pt inset #474171; border-bottom: 1.0pt inset #474171; padding: 0in">

<script type="text/javascript">

/***********************************************
* Pausing updown message scroller- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//configure the below five variables to change the style of the scroller
var scrollerdelay='8000' //delay between msg scrolls. 3000=3 seconds.
var scrollerwidth='357px'
var scrollerheight='59px'
var scrollerbgcolor='#f3f3f3'
//set below to '' if you don't wish to use a background image
var scrollerbackground=''

//configure the below variable to change the contents of the scroller
var messages=new Array()



messages[0]="<table border=0 cellpadding=2 width=100%><tr><td><span style='font-size:9.2pt'><font face='MS Sans Serif'><B>TEST N1</B></span><span style='font-size:8.0pt'></FONT><BR><font face='tahoma'><font color=black>TEST N1</font></span></font></tr></td></table>"
messages[1]="<table border=0 cellpadding=2 width=100%><tr><td><span style='font-size:9.2pt'><font face='MS Sans Serif'><B>TEST N2</B></span><span style='font-size:8.0pt'></FONT><BR><font face='tahoma'><font color=black>TEST N2</font></span></font></tr></td></table>"
messages[2]="<table border=0 cellpadding=2 width=100%><tr><td><span style='font-size:9.2pt'><font face='MS Sans Serif'><B>TEST N3</B></span><span style='font-size:8.0pt'></FONT><BR><font face='tahoma'><font color=black>TEST N3</font></A></span></font></tr></td></table>"
messages[3]="<table border=0 cellpadding=2 width=100%><tr><td><span style='font-size:9.2pt'><font face='MS Sans Serif'><B>TEST N4</B></a></span><span style='font-size:8.0pt'></FONT><BR><font face='tahoma'><font color=black>TEST N4</font></A></span></font></tr></td></table>"
///////Do not edit pass this line///////////////////////

var ie=document.all
var dom=document.getElementById

if (messages.length>2)
i=2
else
i=0

function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
tlayer.top=0
setTimeout("move1(tlayer)",scrollerdelay)
setTimeout("move2(document.main.document.second)",scrollerdelay)
return
}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=5
setTimeout("move1(tlayer)",50)
}
else{
tlayer.top=parseInt(scrollerheight)
tlayer.document.write(messages[i])
tlayer.document.close()
if (i==messages.length-1)
i=0
else
i++
}
}

function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("move2(tlayer2)",scrollerdelay)
setTimeout("move1(document.main.document.first)",scrollerdelay)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("move2(tlayer2)",50)
}
else{
tlayer2.top=parseInt(scrollerheight)
tlayer2.document.write(messages[i])
tlayer2.document.close()
if (i==messages.length-1)
i=0
else
i++
}
}

function move3(whichdiv){
tdiv=eval(whichdiv)
if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
tdiv.style.top=0+"px"
setTimeout("move3(tdiv)",scrollerdelay)
setTimeout("move4(second2_obj)",scrollerdelay)
return
}
if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
setTimeout("move3(tdiv)",50)
}
else{
tdiv.style.top=parseInt(scrollerheight)
tdiv.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++
}
}

function move4(whichdiv){
tdiv2=eval(whichdiv)
if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5){
tdiv2.style.top=0+"px"
setTimeout("move4(tdiv2)",scrollerdelay)
setTimeout("move3(first2_obj)",scrollerdelay)
return
}
if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
setTimeout("move4(second2_obj)",50)
}
else{
tdiv2.style.top=parseInt(scrollerheight)
tdiv2.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++
}
}

function startscroll(){
if (ie||dom){
first2_obj=ie? first2 : document.getElementById("first2")
second2_obj=ie? second2 : document.getElementById("second2")
move3(first2_obj)
second2_obj.style.top=scrollerheight
second2_obj.style.visibility='visible'
}
else if (document.layers){
document.main.visibility='show'
move1(document.main.document.first)
document.main.document.second.top=parseInt(scrollerheight)+5
document.main.document.second.visibility='show'
}
}

window.onload=startscroll

</script>


<ilayer id="main" width=&{scrollerwidth}; height=&{scrollerheight}; bgColor=&{scrollerbgcolor}; background=&{scrollerbackground}; visibility=hide>
<layer id="first" left=0 top=1 width=&{scrollerwidth};>
<script language="JavaScript1.2">
if (document.layers)
document.write(messages[0])
</script>
</layer>
<layer id="second" left=0 top=0 width=&{scrollerwidth}; visibility=hide>
<script language="JavaScript1.2">
if (document.layers)
document.write(messages[dyndetermine=(messages.length==1)? 0 : 1])
</script>
</layer>

</ilayer>

<script language="JavaScript1.2">
if (ie||dom){
document.writeln('<div id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hidden;background-color:'+scrollerbgcolor+' ;background-image:url('+scrollerbackground+')">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0px;top:0px">')
document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:1px;">')
document.write(messages[0])
document.writeln('</div>')
document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:0px;visibility:hidden">')
document.write(messages[dyndetermine=(messages.length==1)? 0 : 1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</div>')
}
</script>
</TD>
</TR>
</TABLE>

In all this
Code: [Select]
messages[0]="<table border=0 cellpadding=2 width=100%><tr><td><span style='font-size:9.2pt'><font face='MS Sans Serif'><B>TEST N1</B></span><span style='font-size:8.0pt'></FONT><BR><font face='tahoma'><font color=black>TEST N1</font></span></font></tr></td></table>"
lines you can write you news instead of  TEST N1.

Code: [Select]
//configure the below five variables to change the style of the scroller
var scrollerdelay='8000' //delay 8 seconds now.
var scrollerwidth='357px'
var scrollerheight='59px'
var scrollerbgcolor='#f3f3f3'
//set below to '' if you don't wish to use a background image

That`s all...

DEMO: http://drandrew.jino.ru/mod_news.html

Thanks!

Best regards, MrAndrew

47
Programming / Problem with Top of The Day MOD
« on: March 28, 2010, 09:31:42 AM »
Hi, all

I`ve a little problem with my POTD MOD, look at this:

Code: [Select]
//-----------------------------------------------------
//--- Photo Of The Day --------------------------------
//-----------------------------------------------------

function get_potd_image() {
    global $site_db, $site_template, $select_mode;

$cat_id_sql = get_auth_cat_sql("auth_viewcat", "NOTIN");

switch (POTD_SELECT_MODE) {
case "rating" : $select_mode = "i.image_rating"; break;
case "votes" : $select_mode = "i.image_votes"; break;
case "comments" : $select_mode = "i.image_comments"; break;
case "downloads" : $select_mode = "i.image_downloads"; break;
case "hits" : $select_mode = "i.image_hits"; break;
case "by_hits" : $select_mode = "i.image_hits"; $select_mode2 = ", i.image_name ASC"; break;
case "random" : $selection = array('rating', 'votes', 'hits', 'comments', 'downloads');
mt_srand((double) microtime() * 1000000);
$select_mode = 'i.image_'.$selection[mt_rand(0, (count($selection)-1))];
break;
}

$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name".get_user_table_field(", u.", "user_name")."
            FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
            LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
            WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND c.cat_id = i.cat_id AND i.image_date >= ".(mktime(0, 0, 0, date("m")  , 1, date("Y")))."
            ORDER BY $select_mode DESC LIMIT 3";

  $potd_image = $site_db->query_firstrow($sql);
$site_db->free_result();
$template = 'potd_image';
show_image($potd_image, "", 1);
$potd_image = $site_template->parse_template($template);
return $potd_image;
}

I set limit on 3, but it show me only 1 image... How to do 3???

Thanks!

48
Installation, Update & Configuration / Max lenght of keywords
« on: March 14, 2010, 02:47:43 PM »
Good Day

When i use words "Cologne Bonn (Konrad Adenauer Wahn) (CGN/EDDK)" in upload field, it`s very long and search result can`t find it.

How can i add more long keyword lenght to the field or do it searchable?

Thanks for helps!

49
Mods & Plugins (Requests & Discussions) / Spaces in upload fields
« on: February 11, 2010, 12:35:05 PM »
I need help.

When i fill forms in my upload page, i need to write USA-Washington, instead USA Washington, becouse search of site will search by first word until the space. If i will write
USA Washington
USA New York
it will search result only for USA, and will show as USA Washington, as USA New York. but i need show only USA Washington
When i write USA-Washington it work done, but view not beauty with "-".

How i can realise it?

50
Hi to all... I`ve search this mod but nothing to got me result.

It is possible to do?

51
Programming / Need you help
« on: January 30, 2010, 10:18:02 PM »
Hi, i have this code:

Quote
//#################################### Start Random Slide Show #################################################

$sql = "SELECT image_id, cat_id, user_id, image_name, image_media_file
        FROM ".IMAGES_TABLE."
        WHERE image_active = 1 AND cat_id NOT IN (".get_auth_cat_sql("auth_viewcat", "NOTIN").") AND image_media_file LIKE '%.jpg'
        ORDER BY RAND()
        LIMIT 30";
        $result = $site_db->query($sql);
     $minis = "";
 while($row = $site_db->fetch_array($result))
   {
     $minis .= "[\"./".THUMB_DIR."/".$row['cat_id']."/".$row['image_media_file']."\",";
     $minis .= "\"".$script_url."/details.php?".URL_IMAGE_ID."=".$row['image_id']."\",\"\"";
  //$minis .= ",\"".$row['image_name']."\"";
     $minis .= "],";
   }
     $minis = substr($minis, 0, -1);
     $max_width = $config['max_thumb_width'];
     $max_hight = $config['max_thumb_height'];
     $minislide ="
    <script type=\"text/javascript\">
     var mygallery=new fadeSlideShow({
      wrapperid: \"fadeshow\",
      dimensions: [$max_width, $max_hight],
      imagearray: [$minis],
      displaymode: {type:'auto', pause:1000, cycles:0, wraparound:true},
      fadeduration: 600,
      togglerid: \"fadeshowtoggler\"
     })
    </script>";
$minislide .= "<div class=\"head1\">";
$minislide .= "<span style=\"line-height:20px;vertical-align:middle;margin-left:3px;\">".$lang['random_image']."</span>";
$minislide .= "</div>";
$minislide .= "<div style=\"width:$max_width px;background-color:#e1e1e1\">";
$minislide .= "<div id=\"fadeshow\" style=\"margin-top:3px;\"></div>";
$minislide .= "<div id=\"fadeshowtoggler\" style=\"width:$max_width px;\">";

$minislide .= "</div>";
$minislide .= "</div>";
$site_template->register_vars("minislide", $minislide);
//#################################### End Random Slide Show #################################################

When i change my language, minislide MOD, not to add prefix in the end of link... i.e. &l=english or other

What i need to change to realize my need???

Thanks!

52
Programming / Need help.. Watermark
« on: January 29, 2010, 08:15:27 AM »
Hi to all.

I need your help.

How can i do this type of watermark? I need to apply a little picture below the photo and text username with site name on this picture.
How can i do this? It is possible to do?


53
Please help me...

How to do link to all images of user from thumbnail or detail page?

54
Programming / More information in the watermark
« on: January 17, 2010, 10:07:28 AM »
Hi, to all!

I need to add more information in the watermark. More then username and sitename, site URL.

Can i add new variables??? For example new value: %A - (will display value from uploadform)

thanks in advance

55
Programming / Send mail in HTML format
« on: December 30, 2009, 08:52:35 AM »
Hi to all. I can`t find answer on this question. Can you help me please??

How can i send massage by e-mail to my users, after checking his pictures, in html format using ACP? Thanks

56
Programming / Nickname in Russian language
« on: December 25, 2009, 01:41:23 PM »
Hi, guys...

I`ve a problem... When i use russian text in annotation, text on the pictures show correct.

But when nickname consist of Russian text, in annotation i see incorrect symbols...

What can i fix this???

Thank you!

57
Programming / How to know hyperlink???
« on: December 21, 2009, 04:05:48 PM »
Hi to all...

I have a little problem. I need to know hyperlink of a search. For example i see hyperlink for user: http://..../search.php?search_user=admin.

But i need to know description search link? Where it is show?

thank very much!

58
Requests for paid modifications / Jobbörse / I need a form
« on: December 18, 2009, 03:58:43 PM »
Hi, to all.

Can you help me with a field in form?

I need to do a new field in form. This field must to show info and link to search by this info... It must be similar field with search keywords.

I hope on your help! Thanks!

Pages: 1 2 3 [4]