4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
February 09, 2010, 02:18:21 PM

Login with username, password and session length
Search:     Advanced search
Translate this page with google
=>
 Translate this page with Google =>
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Modifications / Modifikationen
| |-+  Mods & Plugins (Releases & Support) (Moderators: mawenzi, Rembrandt, rinaldos)
| | |-+  [Mod] Latest News and Archive
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: «« « 1 ... 4 5 6 7 [8] Print
Current Topic Rating: *****
Author Topic: [Mod] Latest News and Archive  (Read 72615 times)
mawenzi
Moderator
4images Guru
*****
Offline Offline

Posts: 4211

Thank You
-Given: 7
-Receive: 37


View Profile
« Reply #105 on: August 13, 2008, 07:28:47 PM »

... as I said ...

... try it again with a totaly new one ... Wink
Logged

Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...
sigma.
Full Member
***
Offline Offline

Posts: 134

Thank You
-Given: 1
-Receive: 0

cydonian.com/potd


View Profile WWW
« Reply #106 on: August 14, 2008, 02:48:58 AM »

looks like {if} comments from the [MOD] Last comments v1 that i had embedded in the same archive.html were causing the problem. Because I dont have that MOD installed back yet, it broke the page. Which is odd to me but oh well. There were no missing }

Thanks for letting me think outloud! Smile
Logged

Lunat
Jr. Member
**
Offline Offline

Posts: 50

Thank You
-Given: 0
-Receive: 3


View Profile WWW
« Reply #107 on: October 03, 2008, 10:40:41 AM »

can users add comments to news in it MOD?
Logged
mawenzi
Moderator
4images Guru
*****
Offline Offline

Posts: 4211

Thank You
-Given: 7
-Receive: 37


View Profile
« Reply #108 on: October 03, 2008, 01:21:50 PM »

... in this version ... no ...
Logged

Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...
Sumale.nin
Addicted member
******
Offline Offline

Posts: 1039

Thank You
-Given: 36
-Receive: 8

Sponsorsuche für weborientierte Dienstleistungen


View Profile WWW
« Reply #109 on: January 11, 2009, 03:33:22 PM »

Bekommt man das Datum des geposteten News auch irgendwie untereinander?

Am besten so:
1
2
3
4
5
6
7
8
9
<div class="tpdate">

<div class="tpdate_day">
04 </div>
<div  class="tpdate_month">
Dec </div>
<div  class="tpdate_year">
2008 </div>
</div>
Logged

Mit freundlichen Grüßen
Benny
Sponsor-Suche.Net
Sponsorsuche für weborientierte Dienstleistungen
AntiNSA2
Hero Member
*****
Offline Offline

Posts: 774

Thank You
-Given: 0
-Receive: 0

As long as I can finish my site before I die.


View Profile WWW
« Reply #110 on: March 03, 2009, 05:48:19 AM »

So... is there a version which allows comments? I will try to install now on 1.7.6,,,,

Wish me luck...
Logged

As long as I can finish my site before I die.
AntiNSA2
Hero Member
*****
Offline Offline

Posts: 774

Thank You
-Given: 0
-Receive: 0

As long as I can finish my site before I die.


View Profile WWW
« Reply #111 on: March 03, 2009, 07:48:00 AM »

Ok this is a great mod, it works. 2 things though..

1) if you could add a way to add comments that would be great.

2) I would like to post vidblog news. I use youtube to store my vids...  I have enabled html in the admin control panel, howver can not seem to get the embedding to function in 4images. Any idea?

Thanks!
Logged

As long as I can finish my site before I die.
AntiNSA2
Hero Member
*****
Offline Offline

Posts: 774

Thank You
-Given: 0
-Receive: 0

As long as I can finish my site before I die.


View Profile WWW
« Reply #112 on: March 13, 2009, 11:25:33 AM »

ok thanks to V@nos media mod everything is ok.

How can we show news on categories.html ???

thanks
Logged

As long as I can finish my site before I die.
ch-alex
Pre-Newbie

Offline Offline

Posts: 7

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #113 on: March 25, 2009, 08:18:39 PM »

Hi all,

first thanks a lot to Fugaziman for this simple but very effective mod.

I have added the following code to my index.php in order to be able to configure the items that are displayed per page in news archive

1
2
$archived_news_page = "5";    // Number of news articles to show per page in archive...
                              // .... change This to fixed number of articles to display per page in news archive

So the configuration part looks now as follows:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//--------------------------------------------------------
// Latest and Archive News Mod --
// --
// User configurable variables --
// You must change the first 4 variables to meet --
// your requirements:     (see notes below) --
//     $display_by_count --
//     $latest_news_day --
//     $show_news_articles --
//     $news_image --
//--------------------------------------------------------
  $display_by_count = "1";         // values 0 or 1 ....
                                   // .... change this to 0 if display by days posted
                                   // .... or 1 to display fixed number of news articles as Latest
                                 
  $latest_news_days = "10";        // Number of days news displays at Latest ....
                                   // .... change This to the number of days news shows as Latest
                               
  $show_news_articles = "3";       // Number of news articles to show ....
                                   // .... change This to fixed number of articles to display for latest news

  $archived_news_page = "5";       // Number of news articles to show per page in archive...
                                   // .... change This to fixed number of articles to display per page in news archive
                               
  $news_image = "66";              // Change This to your Latest news image id
//----------------------------------------------------

To make the varialble work you also need to adjust the following line:
1
$perpage = $show_news_articles;

Replace it by:
1
$perpage = $archived_news_page;

That's all...
Logged
AntiNSA2
Hero Member
*****
Offline Offline

Posts: 774

Thank You
-Given: 0
-Receive: 0

As long as I can finish my site before I die.


View Profile WWW
« Reply #114 on: April 21, 2009, 11:28:24 AM »

This is a great mod that works on categories, index and details php...

however when I try to get it to work on search.php I get the error
1
2
3
4
5
6
7
8

Notice: Undefined variable: news_type in /home/lifephotography/htdocs/search.php on line 605

Notice: Undefined variable: additional_sql_2 in /home/lifephotography/htdocs/search.php on line 624

Notice: Undefined variable: newstype in /home/lifephotography/htdocs/search.php on line 637

Notice: Undefined variable: news_type in /home/lifephotography/htdocs/search.php on line 804

If any one could tell me why it doesnt work id appreciate it.

here is my search.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: search.php                                           *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.6                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/
$templates_used 'thumbnail_bit,whos_online';
$main_template 'search';
define('GET_CACHES'1);
define('GET_USER_ONLINE'1);
define('ROOT_PATH''./');
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');
$user_access get_permission();
include(
ROOT_PATH.'includes/page_header.php');
include(
ROOT_PATH.'includes/search_utils.php');
include(
ROOT_PATH.'includes/shout.php');
error_reporting(E_ALL);
$org_search_keywords $search_keywords;
$org_search_user $search_user;

if (isset(
$HTTP_GET_VARS['search_terms']) || isset($HTTP_POST_VARS['search_terms'])) {
  
$search_terms = isset($HTTP_POST_VARS['search_terms']) ? $HTTP_POST_VARS['search_terms'] : $HTTP_GET_VARS['search_terms'];
  
$search_terms $search_terms == "all" 0;
}
else {
 
$search_terms 1;
}

if (isset(
$HTTP_GET_VARS['search_fields']) || isset($HTTP_POST_VARS['search_fields'])) {
  
$search_fields = isset($HTTP_POST_VARS['search_fields']) ? trim($HTTP_POST_VARS['search_fields']) : trim($HTTP_GET_VARS['search_fields']);
}
else {
  
$search_fields "all";
}

$search_cat $cat_id;

$search_id = array();

if (
$search_user != "" && $show_result == 1) {
  
$search_user str_replace('*''%'trim($search_user));
  
$sql "SELECT ".get_user_table_field("""user_id")."
          FROM "
.USERS_TABLE."
          WHERE "
.get_user_table_field("""user_name")." LIKE '$search_user'";
  
$result $site_db->query($sql);
  
$search_id['user_ids'] = "";
  if (
$result) {
    while (
$row $site_db->fetch_array($result)) {
      
$search_id['user_ids'] .= (($search_id['user_ids'] != "") ? ", " "").$row[$user_table_fields['user_id']];
    }
    
$site_db->free_result($result);
  }
}

if (
$search_keywords != "" && $show_result == 1) {
  
$split_words prepare_searchwords($search_keywordstrue);

  
$match_field_sql = ($search_fields != "all" && isset($search_match_fields[$search_fields])) ? "AND m.".$search_match_fields[$search_fields]." = 1" "";
  
$search_word_cache = array();
  
$who = ($user_info['user_level'] == GUEST) ? "guests" : (($user_info['user_level'] <= USER) ? "users" "admins");
if (count($split_words) > 1) {
  $sql "UPDATE ".SEARCH_STATS_TABLE."
   SET count = count + 1, date = "
.time().", ".$who." = ".$who." + 1
   WHERE text LIKE '"
.addslashes(str_replace("*"""$search_keywords))."' AND word = 0";
  $site_db->query($sql);
if (!$site_db->affected_rows()) {
  $sql "INSERT INTO ".SEARCH_STATS_TABLE."
          (text, date, "
.$who.")
          VALUES
          ('"
.addslashes(str_replace("*"""$search_keywords))."', ".time().", 1)";
  $site_db->query($sql);
}
}

  for (
$i 0$i sizeof($split_words); $i++) {
    if (
$split_words[$i] == "and" || $split_words[$i] == "und" || $split_words[$i] == "or" || $split_words[$i] == "oder" || $split_words[$i] == "not") {
      
$search_word_cache[$i] = ($search_terms) ? "and" $split_words[$i];
    }
    else {if (
count($split_words) == 1) {
    
  $sql "UPDATE ".SEARCH_STATS_TABLE."
        SET count = count + 1, word = 1, date = "
.time().", ".$who." = ".$who." + 1
        WHERE text LIKE '"
.addslashes(str_replace("*"""$split_words[$i]))."' AND word = 1";
    
  $site_db->query($sql);
    
if (!$site_db->affected_rows()) {
    
  $sql "INSERT INTO ".SEARCH_STATS_TABLE."
               (text, word, date, "
.$who.")
               VALUES
               ('"
.addslashes(str_replace("*"""$split_words[$i]))."', 1, ".time().", 1)";
    
  $site_db->query($sql);
    
}
}

      
$sql "SELECT m.image_id
              FROM ("
.WORDLIST_TABLE." w, ".WORDMATCH_TABLE." m)
              WHERE w.word_text LIKE '"
.addslashes(str_replace("*""%"$split_words[$i]))."'
              AND m.word_id = w.word_id
              $match_field_sql"
;
      
$result $site_db->query($sql);
      
$search_word_cache[$i] = array();
      while (
$row $site_db->fetch_array($result)) {
        
$search_word_cache[$i][$row['image_id']] = 1;
      }
      
$site_db->free_result();
    }
  }

  
$is_first_word 1;
  
$operator "or";
  
$image_id_list = array();
  for (
$i 0$i sizeof($search_word_cache); $i++) {
    if (
$search_word_cache[$i] == "and" || $search_word_cache[$i] == "und" || $search_word_cache[$i] == "or" || $search_word_cache[$i] == "oder" || $search_word_cache[$i] == "not") {
      if (!
$is_first_word) {
        
$operator $search_word_cache[$i];
      }
    }
    elseif (
is_array($search_word_cache[$i])) {
      if (
$search_terms) {
        
$operator "and";
      }
      foreach (
$search_word_cache[$i] as $key => $val) {
        if (
$is_first_word || $operator == "or" || $operator == "oder") {
          
$image_id_list[$key] = 1;
        }
        elseif (
$operator == "not") {
          unset(
$image_id_list[$key]);
        }
      }
      if ((
$operator == "and" || $operator == "und") && !$is_first_word) {
        foreach (
$image_id_list as $key => $val) {
          if (!isset(
$search_word_cache[$i][$key])) {
            unset(
$image_id_list[$key]);
          }
        }
      }
    }
    
$is_first_word 0;
  }

  
$search_id['image_ids'] = "";
  foreach (
$image_id_list as $key => $val) {
    
$search_id['image_ids'] .= (($search_id['image_ids'] != "") ? ", " "").$key;
  }
  unset(
$image_id_list);
}

if (
$search_new_images && $show_result == 1) {
  
$search_id['search_new_images'] = 1;
}

if (
$search_cat && $show_result == 1) {
  
$search_id['search_cat'] = $search_cat;
}

if (!empty(
$search_id)) {
  
$site_sess->set_session_var("search_id"serialize($search_id));
}

include(
ROOT_PATH.'includes/page_header.php');

$num_rows_all 0;
if (
$show_result == 1) {
  if (empty(
$search_id)) {
    if (!empty(
$session_info['search_id'])) {
      
$search_id unserialize($session_info['search_id']);
    } else {
      
$search_id unserialize($site_sess->get_session_var("search_id"));
    }
  }

  
$sql_where_query "";

  if (!empty(
$search_id['image_ids'])) {
    
$sql_where_query .= "AND i.image_id IN (".$search_id['image_ids'].") ";
  }

  if (!empty(
$search_id['user_ids'])) {
    
$sql_where_query .= "AND i.user_id IN (".$search_id['user_ids'].") ";
  }

  if (!empty(
$search_id['search_new_images']) && $search_id['search_new_images'] == 1) {
    
$new_cutoff time() - 60 60 24 $config['new_cutoff'];
    
$sql_where_query .= "AND i.image_date >= $new_cutoff ";
  }

  if (!empty(
$search_id['search_cat']) && $search_id['search_cat'] != 0) {
    
$cat_id_sql 0;
    if (
check_permission("auth_viewcat"$search_id['search_cat'])) {
      
$sub_cat_ids get_subcat_ids($search_id['search_cat'], $search_id['search_cat'], $cat_parent_cache);
      
$cat_id_sql .= ", ".$search_id['search_cat'];
      if (!empty(
$sub_cat_ids[$search_id['search_cat']])) {
        foreach (
$sub_cat_ids[$search_id['search_cat']] as $val) {
          if (
check_permission("auth_viewcat"$val)) {
            
$cat_id_sql .= ", ".$val;
          }
        }
      }
    }
    
$cat_id_sql $cat_id_sql !== "AND i.cat_id IN ($cat_id_sql)" "";
  }
  else {
    
$cat_id_sql get_auth_cat_sql("auth_viewcat""NOTIN");
    
$cat_id_sql $cat_id_sql !== "AND i.cat_id NOT IN (".$cat_id_sql.")" "";
  }

  if (!empty(
$sql_where_query)) {
    
$sql "SELECT COUNT(*) AS num_rows_all
            FROM "
.IMAGES_TABLE." i
            WHERE i.image_active = 1 $sql_where_query
            $cat_id_sql"
;
    
$row $site_db->query_firstrow($sql);
    
$num_rows_all $row['num_rows_all'];
  }
}

if (!
$num_rows_all && $show_result == 1)  {
  
$msg preg_replace("/".$site_template->start."search_keywords".$site_template->end."/"$search_keywords$lang['search_no_results']);
}

//-----------------------------------------------------
//--- Show Search Results -----------------------------
//-----------------------------------------------------
if ($num_rows_all && $show_result == 1)  {
  
$link_arg $site_sess->url(ROOT_PATH."search.php?show_result=1");

  include(
ROOT_PATH.'includes/paging.php');
  
$getpaging = new Paging($page$perpage$num_rows_all$link_arg);
  
$offset $getpaging->get_offset();
  
$site_template->register_vars(array(
    
"paging" => $getpaging->get_paging(),
    
"paging_stats" => $getpaging->get_paging_stats()
  ));

  
$imgtable_width ceil((intval($config['image_table_width'])) / $config['image_cells']);
  if ((
substr($config['image_table_width'], -1)) == "%") {
    
$imgtable_width .= "%";
  }

  
$additional_sql "";
  if (!empty(
$additional_image_fields)) {
    foreach (
$additional_image_fields as $key => $val) {
      
$additional_sql .= ", i.".$key;
    }
  }

  
$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".$additional_sql.", 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
          $sql_where_query
          AND c.cat_id = i.cat_id $cat_id_sql
          ORDER BY "
.$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort']."
          LIMIT $offset, $perpage"
;
  
$result $site_db->query($sql);

  
$thumbnails "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n";

  
$count 0;
  
$bgcounter 0;
  while (
$image_row $site_db->fetch_array($result)) {
    if (
$count == 0) {
      
$row_bg_number = ($bgcounter++ % == 0) ? 2;
      
$thumbnails .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    
$thumbnails .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
    
show_image($image_row"search");
    
$thumbnails .= $site_template->parse_template("thumbnail_bit");
    
$thumbnails .= "\n</td>\n";
    
$count++;
    if (
$count == $config['image_cells']) {
      
$thumbnails .= "</tr>\n";
      
$count 0;
    }
  } 
// end while
  
if ($count 0)  {
    
$leftover = ($config['image_cells'] - $count);
    if (
$leftover >= 1) {
      for (
$i 0$i $leftover$i++) {
        
$thumbnails .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      
$thumbnails .= "</tr>\n";
    }
  }
  
$thumbnails .= "</table>\n";
  
$content $thumbnails;
  unset(
$thumbnails);
// end if
else {
// --- Start Mod: Colorsearch by KW --------------------------------------------
$show_colors 200;                                // how many colors show in table
$show_colors_lines_br 11;                       // how many colors in one line
$show_colors_size $config['colorsearch_size'];  //size from the color cells (in ACP settings)

$sql "SELECT w.word_id, w.word_text, m.word_id, COUNT(w.word_text) AS quantity
        FROM ("
.WORDLIST_TABLE." w, ".WORDMATCH_TABLE." m)
        WHERE w.word_id = m.word_id AND m.colorsearch_colors_match = 1
        GROUP BY w.word_text
        ORDER BY quantity DESC
        LIMIT $show_colors"
;
$result $site_db->query($sql);
$num_rows $site_db->get_numrows($result);

if (!
$num_rows)  {
  
$image_farbton_suche "";
}
else  {
  
$image_farbton_suche "";
  
$count 0;
  
$bgcounter 0;
  while (
$image_row $site_db->fetch_array($result)){
    if (
$count == 0) {
    
$image_farbton_suche .= "<tr> \n";
    }
    
$image_farbton_suche .= "<form method=\"post\" action=\"./search.php\"> \n";
    
$image_farbton_suche .= "<td width=\"".$show_colors_size."\" height=\"".$show_colors_size."> \n";
    
$image_farbton_suche .= "<input name=\"search_fields\" value=\"image_farbton\" type=\"hidden\"> \n";
    
$image_farbton_suche .= "<input name=\"search_keywords\" value=\"".$image_row['word_text']."\" type=\"hidden\"> \n";
    
$image_farbton_suche .= "<input name=\"show_result\" value=\"1\" type=\"hidden\"> \n";
    if (
$image_row['quantity'] > 1) {
     
$image_farbton_suche .= "<input style=\"background-color: #".$image_row['word_text']."; font-size: 1px; WIDTH: ".$show_colors_size."px; HEIGHT: ".$show_colors_size."px; border: 1px; cursor: pointer;\" type=\"submit\" value=\"\" title=\"".$lang['farbton_suche_color']." #".$image_row['word_text']."".$lang['farbton_suche_found']." ".$image_row['quantity']." ".$lang['farbton_suche_found_2']."\"> \n";
    } else {
     
$image_farbton_suche .= "<input style=\"background-color: #".$image_row['word_text']."; font-size: 1px; WIDTH: ".$show_colors_size."px; HEIGHT: ".$show_colors_size."px; border: 1px; cursor: pointer;\" type=\"submit\" value=\"\" title=\"".$lang['farbton_suche_color']." #".$image_row['word_text']."".$lang['farbton_suche_found_1']."\"> \n";
    }
    
$image_farbton_suche .= "</td> \n";
    
$image_farbton_suche .= "</form> \n";
    
$count++;
    if (
$count == $show_colors_lines_br) {
      
$image_farbton_suche .= "</tr> \n";
      
$count 0;
    }
  } 
// end while
  
if ($count 0)  {
    
$leftover = ($show_colors_lines_br $count);
    if (
$leftover >= 1) {
      for (
$f 0$f $leftover$f++) {
        
$image_farbton_suche .= "<td>&nbsp;</td> \n";
      }
      
$image_farbton_suche .= "</tr> \n";
    }
  }
  
$image_farbton_suche .= "";
// end else

$site_template->register_vars(array(
  
"image_farbton_suche" => $image_farbton_suche,
  
"lang_farbton_suche" => $lang['farbton_suche']
));
unset(
$image_farbton_suche);
// --- End Mod: Colorsearch by KW ----------------------------------------------
  
$site_template->register_vars(array(
    
"search_keywords" => format_text(stripslashes($org_search_keywords), 2),
    
"search_stats" => "<a href=\"".$site_sess->url(ROOT_PATH."search_stats.php")."\">".$lang['search_stats']."</a>",
    
"search_user" => format_text(stripslashes($org_search_user), 2),
    
"lang_search_by_keyword" => $lang['search_by_keyword'],
    
"lang_search_by_username" => $lang['search_by_username'],
    
"lang_new_images_only" => $lang['new_images_only'],
    
"lang_search_terms" => $lang['search_terms'],
    
"lang_or" => $lang['or'],
    
"lang_and" => $lang['and'],
    
"lang_category" => $lang['category'],
    
"lang_search_fields" => $lang['search_fields'],
    
"lang_all_fields" => $lang['all_fields'],
    
"lang_name_only" => $lang['name_only'],
    
"lang_description_only" => $lang['description_only'],
    
"lang_keywords_only" => $lang['keywords_only'],
    
"category_dropdown" => get_category_dropdown($cat_id)
  ));

  if (!empty(
$additional_image_fields)) {
    
$additional_field_array = array();
    foreach (
$additional_image_fields as $key => $val) {
      if (isset(
$lang[$key.'_only'])) {
        
$additional_field_array['lang_'.$key.'_only'] = $lang[$key.'_only'];
      }
    }
    if (!empty(
$additional_field_array)) {
      
$site_template->register_vars($additional_field_array);
    }
  }
  
$content $site_template->parse_template("search_form");
}
//######################## Start MOD Ajax Slideshow/Diashow with piclens #######################
$ajax_slideshow_piclens_button "";
$slideshow_rss "";
if (
$num_rows_all && $show_result == 1)  {
$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".$additional_sql.", 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
        $sql_where_query
        AND c.cat_id = i.cat_id $cat_id_sql
        ORDER BY "
.$config['image_order']." ".$config['image_sort'].", i.image_id ".$config['image_sort']."
        LIMIT $offset, $perpage"
;

$result $site_db->query($sql);
$num_rows $site_db->get_numrows($result);
$ajax_slideshow_piclens_view 0;

if (!
$num_rows)  {
  
$slideshow_rss "";
  
$ajax_slideshow_piclens_button "";
} else {
  
$ajax_slideshow_piclens_view 1;
  
$slideshow_id $session_info['session_ip'];
  
$slideshow_id str_replace(".","",$slideshow_id);
  
$slideshow_id = ($slideshow_id -117);
  
$slideshow_time date("s");
  
$ist=0;
  
$absoluter_pfad getcwd();
  
$pfad $absoluter_pfad."/data/tmp_mods/slideshow_piclens/";
  
$directory=opendir ($pfad);
  
$deletime time()-10*60// 10 Minuten Cache-Time
  
while ($dat=readdir($directory))
  {
  if (
filetype($pfad.$dat)!="dir")
  {
  
$ist++;
  if (
filemtime($pfad.$dat)<$deletime)
  {
  @
unlink($pfad.$dat);
  }
  }
  }
  
closedir($directory);

  
$fp fopen("./data/tmp_mods/slideshow_piclens/slideshow_".$slideshow_id."".$slideshow_time.".rss""w+");
  function 
leeren($file) {
     
$datei fopen($file,"w");
     
fputs($datei,"");
     
fclose($datei);
  }
  
leeren("./data/tmp_mods/slideshow_piclens/slideshow_".$slideshow_id."".$slideshow_time.".rss"); // Datei die geleert werden soll.
  
$fp fopen("./data/tmp_mods/slideshow_piclens/slideshow_".$slideshow_id."".$slideshow_time.".rss""w+");
   
$text_ajax_slideshow_piclens "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>
\n";
   $text_ajax_slideshow_piclens .= "<rss version=\"2.0\" xmlns:media=\"http://search.yahoo.com/mrss\"> \n";
   $text_ajax_slideshow_piclens .= "<channel> \n";
   if ($config['ajax_slideshowviewer_piclens_bgsound']) {
   $text_ajax_slideshow_piclens .= "<audio url=\"".$config['ajax_slideshowviewer_piclens_bgsound']."\"/> \n";
   }
   if ($config['ajax_slideshowviewer_piclens_logo']) {
   $text_ajax_slideshow_piclens .= "<logo url=\"".$config['ajax_slideshowviewer_piclens_logo']."\"/> \n";
   }
   $text_ajax_slideshow_piclens .= "<title></title> \n";
   $text_ajax_slideshow_piclens .= "<link></link> \n";
   $text_ajax_slideshow_piclens .= "<description></description> \n";
  $count = 0;
  $bgcounter = 0;
  while ($image_slideshow_row = $site_db->fetch_array($result)) {
   $ext = get_file_extension($image_slideshow_row['image_media_file']);
   $config['ajax_slideshowviewer_piclens_Types_array'] = explode(",", $config['ajax_slideshowviewer_piclens_Types']);
   if (in_array($ext, $config['ajax_slideshowviewer_piclens_Types_array'])) {
   $ajax_slideshow_piclens_view = 1;
   show_image($image_slideshow_row);
   $text_ajax_slideshow_piclens .= "<item> \n";
   $text_ajax_slideshow_piclens .= "<title>".$image_slideshow_row['image_name']."</title> \n";
   $text_ajax_slideshow_piclens .= "<link>details.php?image_id=".$image_slideshow_row['image_id']."</link> \n";
   $text_ajax_slideshow_piclens .= "<guid>".$image_row['image_id']."</guid> \n";
   $text_ajax_slideshow_piclens .= "<media:thumbnail url=\"".$script_url."/".THUMB_DIR."/".$image_slideshow_row['cat_id']."/".$image_slideshow_row['image_thumb_file']."\" /> \n";
   if ($ext == 'flv') {
   $text_ajax_slideshow_piclens .= "<media:content url=\"".$script_url."/".MEDIA_DIR."/".$image_slideshow_row['cat_id']."/".$image_slideshow_row['image_media_file']."\" type=\"pl_video/x-flv\" /> \n";
   } else {
   $text_ajax_slideshow_piclens .= "<media:content url=\"".$script_url."/".MEDIA_DIR."/".$image_slideshow_row['cat_id']."/".$image_slideshow_row['image_media_file']."\" type=\"\" /> \n";
   }
   $text_ajax_slideshow_piclens .= "</item> \n";
   $text_ajax_slideshow_piclens .= "\n";
   }
 }
  if ($count > 0)  {
  $leftover = ($config['image_cells'] - $count);
  }
  $text_ajax_slideshow_piclens .= "</channel> \n";
  $text_ajax_slideshow_piclens .= "</rss> \n";
 fwrite($fp, $text_ajax_slideshow_piclens);
 fclose($fp);

if ($user_info['user_level'] == GUEST && $config['ajax_slideshowviewer_piclens_Show'] == "1" && $ajax_slideshow_piclens_view == "1") {
  $ajax_slideshow_piclens_button = "<img src=\"".get_gallery_image("diashow_off.gif")."\" border=\"0\" alt=\"\" />";
} elseif ($user_info['user_level'] != GUEST && $config['ajax_slideshowviewer_piclens_Show'] == "1" && $ajax_slideshow_piclens_view == "1" || $config['ajax_slideshowviewer_piclens_Show'] == "2" && $ajax_slideshow_piclens_view == "1") {
  $ajax_slideshow_piclens_button = "<a href=\"javascript:PicLensLite.start();\"><img src=\"".get_gallery_image("diashow.gif")."\" border=\"0\" alt=\"\" /></a>";
  $slideshow_rss = "./data/tmp_mods/slideshow_piclens/slideshow_".$slideshow_id."".$slideshow_time.".rss";
}
}
unset($ajax_slideshow_piclens);
}
//######################## End MOD Ajax Slideshow/Diashow with piclens #######################
//-----------------------------------------------------
//--- Show New Images ---------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  "has_rss"   => true,
  "rss_title" => "RSS Feed: ".format_text($config['site_name'], 2)." (".str_replace(':', '', $lang['new_images']).")",
  "rss_url"   => $script_url."/rss.php?action=images"
));

$imgtable_width = ceil(intval($config['image_table_width']) / $config['image_cells']);
if ((substr($config['image_table_width'], -1)) == "%") {
  $imgtable_width .= "%";
}

$additional_sql = "";
if (!empty($additional_image_fields)) {
  foreach ($additional_image_fields as $key => $val) {
    $additional_sql .= ", i.".$key;
  }
}

$num_new_images = 12;
$config['image_cells'] = 3;
$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".$additional_sql.", 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 c.cat_id = i.cat_id AND i.cat_id NOT IN (".get_auth_cat_sql("auth_viewcat", "NOTIN").")
        ORDER BY i.image_date DESC
        LIMIT $num_new_images";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);

if (!$num_rows)  {
  $new_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  $new_images .= $lang['no_new_images'];
  $new_images .= "</td></tr></table>";
}
else  {
  $new_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
  $count = 0;
  $bgcounter = 0;
  while ($image_row = $site_db->fetch_array($result)){
    if ($count == 0) {
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
      $new_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    $new_images .= "<td class=\"imagerow\" width=\"".$imgtable_width."\" valign=\"top\">\n";

    show_image($image_row);
    $new_images .= $site_template->parse_template("thumbnail_bit");
    $new_images .= "\n</td>\n";
    $count++;
    if ($count == $config['image_cells']) {
      $new_images .= "</tr>\n";
      $count = 0;
    }
  } // end while

  if ($count > 0)  {
    $leftover = ($config['image_cells'] - $count);
    if ($leftover >= 1) {
      for ($f = 0; $f < $leftover; $f++) {
        $new_images .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      $new_images .= "</tr>\n";
    }
  }
  $new_images .= "</table>\n";
} // end else

$site_template->register_vars("new_images", $new_images);
unset($new_images);
///--------------------------------------------------------
// Latest and Archive News Mod --
// --
// User configurable variables --
// You must change the first 4 variables to meet --
// your requirements:     (see notes below) --
//     $display_by_count --
//     $latest_news_day --
//     $show_news_articles --
//     $news_image --
//--------------------------------------------------------
  $display_by_count = "0";      // values 0 or 1 ....
                                // .... change this to 0 if display by days posted
                                // .... or 1 to display fixed number of news articles as Latest
                               
  $latest_news_days = "31";     // Number of days news displays at Latest ....
                                // .... change This to the number of days news shows as Latest
                               
  $show_news_articles = "5";    // Number of news articles to show ....
                                // .... change This to fixed number of articles to display for latest news
                               
  $news_image = "172";          // Change This to your Latest news image id
//----------------------------------------------------

$new_news = (time() - 60 * 60 * 24 * $latest_news_days);

 

  $additional_sql = "";

  if ($news_type == "latestnews") {

    if ($display_by_count) {
        $additional_sql .= "  c.image_id = '".$news_image."'";
    }
    else {
        $additional_sql .= " c.comment_date > '".$new_news."' AND c.image_id = '".$news_image."'";
        $additional_sql_2 .= "";
    }
  }

  else {
    $additional_sql .= " c.image_id = '".$news_image."'";
    $clickstream = "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>&nbsp;/&nbsp;Archived News";
  }

  $sql = "SELECT c.comment_headline, c.comment_text, c.comment_date, c.image_id
            FROM ".COMMENTS_TABLE." c
            WHERE ".$additional_sql."
            ORDER BY c.comment_date DESC" .$additional_sql_2 ;

  $result = $site_db->query($sql);
  $num_rows = $site_db->get_numrows($result);
  $news_comment_row = array();

  while ($row = $site_db->fetch_array($result)) {
    $news_comment_row[] = $row;
  }

  $site_db->free_result($result);
   
// This is the Paging stuff
  if ($newstype == "latestnewsall") {
       
    include(ROOT_PATH.'includes/paging.php');
    $perpage = $show_news_articles;
    $link_arg = $site_sess->url(ROOT_PATH."index.php?newstype=latestnewsall");
    $getpaging = new Paging($page, $perpage, $num_rows, $link_arg);
    $offset = $getpaging->get_offset();

    $site_template->register_vars(array(
      "paging" => $getpaging->get_paging(),
      "paging_stats" => $getpaging->get_paging_stats()
    ));
     
    $sql = "SELECT c.comment_headline, c.comment_text, c.comment_date, c.image_id
            FROM ".COMMENTS_TABLE." c
            WHERE ".$additional_sql."
            ORDER BY c.comment_date DESC" .$additional_sql_2." 
            LIMIT $offset, $perpage";

          $result = $site_db->query($sql);
          $num_rows = $site_db->get_numrows($result);
          $news_comment_row = array();
           
      while ($row = $site_db->fetch_array($result)) {
            $news_comment_row[] = $row;
          }
  }

  if (!$num_rows) {
      $news_comments = "&nbsp;&nbsp;&nbsp;<b>No New News to report within the last ".$latest_news_days." days.</b>";
  }
  else {
      $news_comments = "";
      $bgcounter = 0;

    for ($i = 0; $i < $num_rows; $i++) {
        $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;

        $site_template->register_vars(array(
            "news_comment_headline" => format_text($news_comment_row[$i]['comment_headline'], 0, $config['wordwrap_comments'], 0, 0),
            "news_comment_text" => format_text($news_comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
            "news_comment_date" => format_date($config['date_format']." ".$config['time_format'], $news_comment_row[$i]['comment_date']),
            "row_bg_number" => $row_bg_number));

        $news_comments .= $site_template->parse_template("news_comment_bit");
    }

  }
  $site_template->register_vars("news_comments", $news_comments);
  unset($news_comments);

//-----------------------------------------------------
//---End of Show Latest News   -------------------------------
//-----------------------------------------------------
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['search']."</span>";
/*
  MOD LAST COMMENTS
   START INSERT
*/
//Settings
$num = 7; //how many comments to show
$thumb_size = 150; //max dim of thumbnails in pixels
$text_len = 200; //max lenght of the text to show (bbcode and html are counted too)
//End settings

$last_comments = "";
$sql = "SELECT c.image_id, c.comment_id, c.user_id as comment_user_id, c.user_name as guest_user_name, c.comment_headline, c.comment_text, c.comment_date, i.cat_id, i.user_id, i.image_name, i.image_media_file, i.image_thumb_file".get_user_table_field(", u.", "user_name")." as user_name".get_user_table_field(", s.", "user_name")." as comment_user_name
        FROM ".COMMENTS_TABLE." c
        LEFT JOIN ".IMAGES_TABLE." i ON i.image_id = c.image_id
        LEFT JOIN ".USERS_TABLE." u ON ".get_user_table_field("u.", "user_id")." = i.user_id
        LEFT JOIN ".USERS_TABLE." s ON ".get_user_table_field("s.", "user_id")." = c.user_id
        WHERE i.image_active = 1 AND i.image_allow_comments = 1 AND i.cat_id NOT IN (".get_auth_cat_sql('auth_readcomment', 'NOTIN').") AND i.cat_id NOT IN (".get_auth_cat_sql('auth_viewcat', 'NOTIN').") AND i.cat_id NOT IN (".get_auth_cat_sql('auth_viewimage', 'NOTIN').")
        ORDER BY c.comment_date DESC
        LIMIT ".$num;
$result = $site_db->query($sql);
$bgcounter = 1;
while ($row = $site_db->fetch_array($result))
{
  $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
  if (empty($row['image_thumb_file']))
  {
    $thumb_file = ICON_PATH."/".get_file_extension($row['image_media_file']).".gif";
  }
  else
  {
    $thumb_file = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$row['cat_id']."/".$row['image_thumb_file'];
  }
  $thumb_info = @getimagesize($thumb_file);
  $width = ($thumb_info[0]) ? $thumb_info[0] : $thumb_size;
  $height = ($thumb_info[1]) ? $thumb_info[1] : $thumb_size;
  if ($width > $thumb_size && $height > $thumb_size)
  {
    $ratio = $width / $height;
    if ($ratio > 1) {
      $new_width = $thumb_size;
      $new_height = round(($thumb_size/$width) * $height);
    }else {
      $new_width = round(($thumb_size/$height) * $width);
      $new_height = $thumb_size;
    }
  }
  else
  {
    $new_width = $width;
    $new_height = $height;
  }
  $view_image = true;
  $thumb = "<img class=\"slt\" src=\"".$thumb_file."\" border=\"".$config['image_border']."\" width=\"".$new_width."\" height=\"".$new_height."\" alt=\"".$row['image_name']."\" />";
/*
  $view_image = check_permission('auth_viewcat', $row['cat_id']);
  $thumb = "<img src=\"".$thumb_file."\"".(($view_image) ? "" : " onClick=\"alert('".(($lang['auth_alert'][$cat_id]) ? $lang['auth_alert'][$cat_id] : $lang['auth_alert']['default'])."');\"")." border=\"".$config['image_border']."\" width=\"".$new_width."\" height=\"".$new_height."\" alt=\"".$row['image_name']."\" />";
*/
  $image_user_name = ($row['user_id'] != GUEST) ? $row['user_name'] : $lang['userlevel_guest'];
  $image_user_link = ($row['user_id'] != GUEST) ? $site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$row['user_id']) : "";
  $comment_user_name = ($row['comment_user_id'] == GUEST) ? ((empty($row['guest_user_name'])) ? $lang['userlevel_guest'] : $row['guest_user_name']) : $row['comment_user_name'];
  $comment_user_link = ($row['comment_user_id'] != GUEST) ? $site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$row['comment_user_id']) : "";
  $text = $row['comment_text'];
  if (strlen($text) > $text_len) {
    $text = substr($text, 0, $text_len)." ...";
  }
 
      $site_template->register_vars(array(
    "last_comments_more" => "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showcomments", "&")."\">".$lang['last_comments_more']."</a>",
    "comment_image" => ($view_image) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$row['image_id'])."\" class=\"slt\">".$thumb."</a>" : $thumb,
    "comment_guest" => ($row['comment_user_id'] == GUEST && !empty($row['guest_user_name'])) ? $lang['userlevel_guest'] : "",
    "comment_image_name" => ($view_image) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$row['image_id'])."\" class=\"nsslt\">".stripslashes($row['image_name'])."</a>" : stripslashes($row['image_name']),
    "image_cat_name" => (check_permission('auth_viewcat', $row['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$row['cat_id'])."\" class=\"slt\">".$cat_cache[$row['cat_id']]['cat_name']."</a>" : $cat_cache[$row['cat_id']]['cat_name'],
    "image_user_name" =>   ($image_user_link) ? "<a href=\"".$image_user_link."\">".$image_user_name."</a>" : $image_user_name,
    "comment_user_name" => ($comment_user_link) ? "<a href=\"".$comment_user_link."\" class=\"slt\">".$comment_user_name."</a>" : $comment_user_name,
    "comment_user_id" => $row['comment_user_id'],
    "comment_headline" => format_text($row['comment_headline'], 0, $config['wordwrap_comments'], $config['bb_comments'], 0, 1),
    "comment_text" => format_text($text, $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments'], 1, 0),
    "comment_date" => format_date($config['date_format']." ".$config['time_format'], $row['comment_date']),
    "row_bg_number" => $row_bg_number
  ));
  $last_comments .= $site_template->parse_template("last_comment_bit");
}
/*
if (empty($last_comments))
{
  $last_comments = $lang['no_comments'];
}
*/
$site_template->register_vars(array(
  "lang_last_comments" => $lang['last_comments'],
  "last_comments" => $last_comments
));
/*
  MOD LAST COMMENTS
  START INSERT
*/           
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  "content" => $content,
  "msg" => $msg,
  //###################### Start MOD Ajax Slideshow/Diashow with piclens #######################
  "slideshow_rss" => $slideshow_rss,
  "ajax_slideshow_piclens_button" => $ajax_slideshow_piclens_button,
//######################## End MOD Ajax Slideshow/Diashow with piclens #######################
  "clickstream" => $clickstream,
  "lang_search" => $lang['search']
));
if ($news_type == "latestnewsall") { 
  $site_template->print_template($site_template->parse_template(archive));     

else { 
  $site_template->print_template($site_template->parse_template($main_template)); 
}
include(ROOT_PATH.'includes/page_footer.php');
?>


Logged

As long as I can finish my site before I die.
4ella
Jr. Member
**
Offline Offline

Posts: 90

Thank You
-Given: 0
-Receive: 0


View Profile WWW
« Reply #115 on: April 27, 2009, 09:20:37 PM »

Hello everyone ,

I just finished this very nice mod but I can' t see the Latest News picture at all (nevermind I use comments HTML form to upload another, but was only curious what I made bad that I dont have there the picture when I twice put this ID number at place where I had to do put it)

2. problem -  like many other people here I can't get to archives at all, the page after the click is always reverting back to the main page. Because before every post I  publish here I read carefully all the posts in thread before,to find the solution myself with the help of the others , I noticed that it is about 5-7 posts in this topic which had exactly the same problem and I can't find here the answer or some solution for that , nobody had never responded ,  I use 1.7.6 version .
                                                                                Can somebody help me ?

another thing wanted to ask is it possible to shorten comments on home page - the same princip like last comments has in index.php ?
I would like to shorten only first page -home.html and on archives.html want to have whole article .

I m sure that this is simple because there exist many versions - shorten category , shorten last comments etc. but Im not able to do that .


I was trying to put it there the code from last comments , but it doesnt work ,

Quote
$text_len = "200"; //max lenght of the text to show (bbcode and html are counted too)

For me the best solution would be like for the Mawenzi his  AJAX Mawenzi website's shorten category descriptions with small  (+ ) button , I'm searching for this all around and I cant find it , I like it a lot .




Logged


http://www.dancersrecruit.com/pictures/
4IMAGES 1.7.6 version/default theme
Apache version   2.2.11 (Unix)
PHP version   5.2.9
MySQL version   5.0.75-community-log
Architecture   x86_64
Operating system   Linux
AntiNSA2
Hero Member
*****
Offline Offline

Posts: 774

Thank You
-Given: 0
-Receive: 0

As long as I can finish my site before I die.


View Profile WWW
« Reply #116 on: May 03, 2009, 09:25:24 AM »

Ok On page 4 of this thread earthlyk has the same problem, which he solved by adding this code
1
2
3
4
5
6
7
8
9
10
11
12
13
$new_news = (time() - 60 * 60 * 24 * $latest_news_days);

$newstype = $_GET["newstype"];     //I add this line.

if ($newstype == "latestnewsall"){
    $news_type = "latestnewsall";
    }
else {
    $news_type = "latestnews";
    }

  $additional_sql = "";
  $additional_sql_2  = ""; //and add this line too.


However he also turned off the error reporting in the php.ini   ...

I cant turn it off... I need to learn it on... I am only getting these errors on search.php...   is there something I am doing wrong.
Logged

As long as I can finish my site before I die.
Damebi
Pre-Newbie

Offline Offline

Posts: 3

Thank You
-Given: 0
-Receive: 0

WooOOooT


View Profile WWW
« Reply #117 on: July 12, 2009, 04:41:03 PM »

THX a lot !  Very Happy

Funktioniert wunderbar mit // works wunderfull with --> V 1.7.7.


--> http://www.damebi.at/4images/
(nicht erschrecken, bin erst seit gestern am rumcoden)
Logged

Breit wie ein LKW und zuverlässig wie die Rolex an deinem Handgelenkt !
GaYan
Full Member
***
Offline Offline

Posts: 200

Thank You
-Given: 2
-Receive: 0

♫ | G2 | ♫


View Profile WWW
« Reply #118 on: August 14, 2009, 07:11:35 PM »

is this possible with 1.7.6 "? S
Logged





Live With Flash

Pages: «« « 1 ... 4 5 6 7 [8] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
piqs.de - Fotocommunity & lizenzfreie Fotos