Statistik |
Beiträge: 144.531 (Täglich: 19,19 )
Themen: 16.700
Mitglieder: 13.209
Neuestes Mitglied: zitronentee.
Ausl. d. letzten Minute: 170%
Ausl. d. letzten 5 Minuten: 156%
Ausl. d. letzten 15 Minuten: 156%
Aktulle Uhrzeit: 20:39
Freier Webspace: 4.04 TB
PHP-Version: 7.4.33
|
|
|
|
|
wiw Anzeige |
|
Hallo,
mir ist aufgefallen, dass wenn man im Userprofil ist, die wiw "im Locator" anzeigt.
Ich habe die beiden Einträge in der class_wiw.php überprüft, also die für den Locator und Profile, aber ich kann da nix finden.
Vielleicht kann mir ja ein Profi von euch da weiter helfen
LG Franzis
code: |
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:
|
<?php
// ************************************************************************************//
// * WoltLab Burning Board 2
// ************************************************************************************//
// * Copyright (c) 2001-2004 WoltLab GmbH
// * Web http://www.woltlab.de/
// * License http://www.woltlab.de/products/burning_board/license_en.php
// * http://www.woltlab.de/products/burning_board/license.php
// ************************************************************************************//
// * WoltLab Burning Board 2 is NOT free software.
// * You may not redistribute this package or any of it's files.
// ************************************************************************************//
// * $Date: 2004-10-20 13:24:57 +0200 (Wed, 20 Oct 2004) $
// * $Author: Burntime $
// * $Rev: 1453 $
// ************************************************************************************//
class WIW extends useronline {
var $useronlinecache = array();
var $boardids = "";
var $threadids = "";
var $userids = "";
var $eventids = "";
var $postids = "";
var $boardcache = array();
var $threadcache = array();
var $usercache = array();
var $eventcache = array();
var $postcache = array();
var $counter = -1;
function insert($data) {
list($script, $querystring, ) = explode("?", $data['request_uri']);
if ($script == "attachment.php") $script = "thread.php";
if ($script == "attachmentedit.php") $script = "board.php";
$data['script'] = $script;
if ($script == "board.php" || $script == "board.html" || $script == "newthread.php") $this->boardids .= ",".$data['boardid'];
elseif ($script == "thread.php" || $script == "thread.html" || $script == "addreply.php") $this->threadids .= ",".$data['threadid'];
elseif ($script == "profile.php") {
$a_querystring = explode("&", $querystring);
for ($i = 0; $i < count($a_querystring); $i++) {
list($varname, $value, ) = explode("=", $a_querystring[$i]);
if ($varname == "userid") {
$value = intval($value);
if ($value != 0) {
$this->userids .= ",".$value;
$data['profile_userid'] = $value;
}
}
}
}
elseif ($script == "calendar.php") {
$calendar_action = '';
$eventid = 0;
$a_querystring = explode("&", $querystring);
for ($i = 0; $i < count($a_querystring); $i++) {
list($varname, $value, ) = explode("=", $a_querystring[$i]);
if ($varname == "id") $eventid = intval($value);
if ($varname == "action") $calendar_action = $value;
}
if ($calendar_action == "viewevent" && $eventid != 0) {
$this->eventids .= ",".$eventid;
$data['eventid'] = $eventid;
}
}
elseif ($script == "editpost.php") {
$a_querystring = explode("&", $querystring);
for ($i = 0; $i < count($a_querystring); $i++) {
list($varname, $value, ) = explode("=", $a_querystring[$i]);
if ($varname == "postid") {
$value = intval($value);
if ($value != 0) {
$this->postids .= ",".$value;
$data['postid'] = $value;
}
}
}
}
$this->useronlinecache[] = $data;
}
function cache() {
global $permissioncache, $wbbuserdata, $n, $db, $lang;
if ($this->boardids != '' || $this->threadids != '' || $this->postids != '') {
if (!isset($permissioncache)) $permissioncache = getPermissions();
$global_boardids1 = '';
$global_boardids2 = '';
$result = $db->unbuffered_query("SELECT boardid FROM bb".$n."_boards WHERE password='' AND invisible<>2");
while ($row = $db->fetch_array($result)) {
if (!isset($permissioncache[$row['boardid']]['can_enter_board']) || $permissioncache[$row['boardid']]['can_enter_board'] == -1) $permissioncache[$row['boardid']]['can_enter_board'] = $wbbuserdata['can_enter_board'];
if (!isset($permissioncache[$row['boardid']]['can_view_board']) || $permissioncache[$row['boardid']]['can_view_board'] == -1) $permissioncache[$row['boardid']]['can_view_board'] = $wbbuserdata['can_view_board'];
if ($permissioncache[$row['boardid']]['can_view_board'] == 1) $global_boardids1 .= ",".$row['boardid'];
if ($permissioncache[$row['boardid']]['can_enter_board'] == 1) $global_boardids2 .= ",".$row['boardid'];
}
if ($this->boardids != '' && $global_boardids1 != '') {
$result = $db->unbuffered_query("SELECT boardid, title FROM bb".$n."_boards WHERE boardid IN (0".$this->boardids.") AND boardid IN (0".$global_boardids1.")");
while ($row = $db->fetch_array($result)) $this->boardcache[$row['boardid']] = getlangvar($row['title'], $lang);
}
if ($this->threadids != '' && $global_boardids2 != '') {
$result = $db->unbuffered_query("SELECT threadid, topic FROM bb".$n."_threads WHERE threadid IN (0".$this->threadids.") AND boardid IN (0".$global_boardids2.")");
while ($row = $db->fetch_array($result)) $this->threadcache[$row['threadid']] = htmlconverter(textwrap($row['topic']));
}
if ($this->postids != '' && $global_boardids2 != '') {
$result = $db->unbuffered_query("SELECT p.postid, p.posttopic, p.message FROM bb".$n."_posts p, bb".$n."_threads t WHERE p.threadid=t.threadid AND p.postid IN (0".$this->postids.") AND t.boardid IN (0".$global_boardids2.")");
while ($row = $db->fetch_array($result)) $this->postcache[$row['postid']] = htmlconverter(textwrap( (($row['posttopic'] != '') ? ($row['posttopic']) : (wbb_substr($row['message'], 0, 100))) ));
}
}
if ($this->userids != '') {
$result = $db->unbuffered_query("SELECT userid, username FROM bb".$n."_users WHERE userid IN (0".$this->userids.")");
while ($row = $db->fetch_array($result)) $this->usercache[$row['userid']] = htmlconverter($row['username']);
}
if ($this->eventids != '' && $wbbuserdata['can_view_calendar']) {
$result = $db->unbuffered_query("SELECT eventid, subject FROM bb".$n."_events WHERE eventid IN (0".$this->eventids.") AND (public=2 OR (public=1 AND groupid = '$wbbuserdata[groupid]') OR (public=0 AND userid = '$wbbuserdata[userid]'))");
while ($row = $db->fetch_array($result)) $this->eventcache[$row['eventid']] = htmlconverter($row['subject']);
}
}
function get() {
global $lang, $session, $SID_ARG_1ST, $SID_ARG_2ND, $SID_ARG_2ND_UN, $wbbuserdata;
$this->counter++;
if (isset($this->useronlinecache[$this->counter])) {
if (!$this->useronlinecache[$this->counter]['invisible'] || $this->can_view_ghosts == 1) {
switch ($this->useronlinecache[$this->counter]['script']) {
case "pranger.php":
$location = $lang->get("LANG_WIW_FILE_PRANGER", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "friedhof.php":
$location = $lang->get("LANG_WIW_FILE_FRIEDHOF", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "index.php":
$location = $lang->get("LANG_WIW_FILE_INDEX", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "chat.php":
$location = $lang->get("LANG_WIW_FILE_CHAT", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "xquiz.php":
$location = $lang->get("LANG_WIW_FILE_XQUIZ", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "locator.php":
$location = $lang->get("LANG_WIW_FILE_LOCATOR", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
CASE "uno.php":
eval ("\$location = \"".$lang->get4eval("LANG_WIW_FILE_UNO")."\";");
break;
CASE "uno_main.php":
eval ("\$location = \"".$lang->get4eval("LANG_WIW_FILE_UNO")."\";");
break;
case "jgs_galerie.php";
eval ("\$location = \"".$lang->get4eval("LANG_WIW_FILE_GALERIE")."\";");
break;
case "jgs_galerie_ecard.php";
eval ("\$location = \"".$lang->get4eval("LANG_WIW_FILE_GALERIE")."\";");
break;
case "jgs_galerie_upload.php";
eval ("\$location = \"".$lang->get4eval("LANG_WIW_FILE_GALERIE")."\";");
break;
case "jgs_galerie_userbilder.php";
eval ("\$location = \"".$lang->get4eval("LANG_WIW_FILE_GALERIE")."\";");
break;
case "jgs_galerie_kategorie.php";
eval ("\$location = \"".$lang->get4eval("LANG_WIW_FILE_GALERIE")."\";");
break;
case "wiw.php":
$location = $lang->get("LANG_WIW_FILE_WIW", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "gb_index.php":
$location = $lang->get("LANG_WIW_FILE_GBOOK", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "gb_addentry.php":
$location = $lang->get("LANG_WIW_FILE_GBOOK_ADDENTRY", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "register.php":
case "regimage.php":
$location = $lang->get("LANG_WIW_FILE_REGISTER", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "usercp.php":
$location = $lang->get("LANG_WIW_FILE_USERCP", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "monopoly.php":
eval ("\$location = \"".$lang->get4eval("LANG_WIW_FILE_MONOPOLY")."\";");
break;
case "monopoly_main.php":
eval ("\$location = \"".$lang->get4eval("LANG_WIW_FILE_MONOPOLY")."\";");
break;
case "kniffel.php":
$location = $lang->get("LANG_WIW_FILE_KNIFFEL", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "kniffel_play.php":
$location = $lang->get("LANG_WIW_FILE_KNIFFEL", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "login.php":
$location = $lang->get("LANG_WIW_FILE_LOGIN");
break;
case "ct_blocker.php":
$location = $lang->get("LANG_WIW_FILE_CT_BLOCKER");
break;
case "ct_mail.php":
$location = $lang->get("LANG_WIW_FILE_CT_MAIL");
break;
case "profile.php":
if (isset($this->useronlinecache[$this->counter]['profile_userid']) && isset($this->usercache[$this->useronlinecache[$this->counter]['profile_userid']])) {
$userid = $this->useronlinecache[$this->counter]['profile_userid'];
$username = $this->usercache[$userid];
$location = $lang->get("LANG_WIW_FILE_PROFILE", array('$userid' => $userid, '$SID_ARG_2ND' => $SID_ARG_2ND, '$username' => $username));
}
else $location = $lang->get("LANG_WIW_FILE_UNKNOWN");
break;
case "logout.php":
$location = $lang->get("LANG_WIW_FILE_LOGOUT");
break;
case "memberslist.php":
$location = $lang->get("LANG_WIW_FILE_MEMBERSLIST", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "search.php":
$location = $lang->get("LANG_WIW_FILE_SEARCH", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "calendar.php":
if (isset($this->useronlinecache[$this->counter]['eventid']) && isset($this->eventcache[$this->useronlinecache[$this->counter]['eventid']])) {
$eventid = $this->useronlinecache[$this->counter]['eventid'];
$subject = $this->eventcache[$eventid];
$location = $lang->get("LANG_WIW_FILE_CALENDAR_VIEWEVENT", array('$eventid' => $eventid, '$SID_ARG_2ND' => $SID_ARG_2ND, '$subject' => $subject));
}
else $location = $lang->get("LANG_WIW_FILE_CALENDAR", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "team.php":
$location = $lang->get("LANG_WIW_FILE_TEAM", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
// *** STATISTIK ***
case "statistics.php":
$location = $lang->get("LANG_WIW_FILE_STATISTICS", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
// *** STATISTIK ***
case "pms.php":
$location = $lang->get("LANG_WIW_FILE_PMS", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "sudoku.php":
$location = $lang->get("LANG_WIW_FILE_SUDOKU", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "backgammon_main.php":
$location = $lang->get("LANG_WIW_FILE_BACKGAMMON", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "backgammon_secret.php":
$location = $lang->get("LANG_WIW_FILE_BACKGAMMON", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "backgammon.php":
$location = $lang->get("LANG_WIW_FILE_BACKGAMMON", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "modcp.php":
$location = $lang->get("LANG_WIW_FILE_MODCP");
break;
case "editpost.php":
if (isset($this->useronlinecache[$this->counter]['postid']) && isset($this->postcache[$this->useronlinecache[$this->counter]['postid']])) {
$postid = $this->useronlinecache[$this->counter]['postid'];
$topic = $this->postcache[$postid];
$location = $lang->get("LANG_WIW_FILE_EDITPOST", array('$postid' => $postid, '$SID_ARG_2ND' => $SID_ARG_2ND, '$topic' => $topic));
}
else $location = $lang->get("LANG_WIW_FILE_UNKNOWN");
break;
case "board.php":
if (isset($this->useronlinecache[$this->counter]['boardid']) && isset($this->boardcache[$this->useronlinecache[$this->counter]['boardid']])) {
$boardid = $this->useronlinecache[$this->counter]['boardid'];
$title = $this->boardcache[$boardid];
$location = $lang->get("LANG_WIW_FILE_BOARD", array('$boardid' => $boardid, '$SID_ARG_2ND' => $SID_ARG_2ND, '$title' => $title));
}
else $location = $lang->get("LANG_WIW_FILE_UNKNOWN");
break;
case "newthread.php":
if (isset($this->useronlinecache[$this->counter]['boardid']) && isset($this->boardcache[$this->useronlinecache[$this->counter]['boardid']])) {
$boardid = $this->useronlinecache[$this->counter]['boardid'];
$title = $this->boardcache[$boardid];
$location = $lang->get("LANG_WIW_FILE_NEWTHREAD", array('$boardid' => $boardid, '$SID_ARG_2ND' => $SID_ARG_2ND, '$title' => $title));
}
else $location = $lang->get("LANG_WIW_FILE_UNKNOWN");
break;
case "thread.php":
if (isset($this->useronlinecache[$this->counter]['threadid']) && isset($this->threadcache[$this->useronlinecache[$this->counter]['threadid']])) {
$threadid = $this->useronlinecache[$this->counter]['threadid'];
$topic = $this->threadcache[$threadid];
$location = $lang->get("LANG_WIW_FILE_THREAD", array('$threadid' => $threadid, '$SID_ARG_2ND' => $SID_ARG_2ND, '$topic' => $topic));
}
else $location = $lang->get("LANG_WIW_FILE_UNKNOWN");
break;
case "addreply.php":
if (isset($this->useronlinecache[$this->counter]['threadid']) && isset($this->threadcache[$this->useronlinecache[$this->counter]['threadid']])) {
$threadid = $this->useronlinecache[$this->counter]['threadid'];
$topic = $this->threadcache[$threadid];
$location = $lang->get("LANG_WIW_FILE_ADDREPLY", array('$threadid' => $threadid, '$SID_ARG_2ND' => $SID_ARG_2ND, '$topic' => $topic));
}
else $location = $lang->get("LANG_WIW_FILE_UNKNOWN");
break;
case "usergroups.php":
$location = $lang->get("LANG_WIW_FILE_USERGROUPS");
break;
case "linkus.php":
$location = $lang->get("LANG_WIW_FILE_YW_LINKUS", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "index.html":
$location = $lang->get("LANG_WIW_FILE_ARCHIVE_INDEX", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
case "board.html":
if (isset($this->useronlinecache[$this->counter]['boardid']) && isset($this->boardcache[$this->useronlinecache[$this->counter]['boardid']])) {
$boardid = $this->useronlinecache[$this->counter]['boardid'];
$title = $this->boardcache[$boardid];
$location = $lang->get("LANG_WIW_FILE_ARCHIVE_BOARD", array('$boardid' => $boardid, '$SID_ARG_2ND' => $SID_ARG_2ND, '$title' => $title));
}
else $location = $lang->get("LANG_WIW_FILE_UNKNOWN");
break;
case "thread.html":
if (isset($this->useronlinecache[$this->counter]['threadid']) && isset($this->threadcache[$this->useronlinecache[$this->counter]['threadid']])) {
$threadid = $this->useronlinecache[$this->counter]['threadid'];
$topic = $this->threadcache[$threadid];
$location = $lang->get("LANG_WIW_FILE_ARCHIVE_THREAD", array('$threadid' => $threadid, '$SID_ARG_2ND' => $SID_ARG_2ND, '$topic' => $topic));
}
else $location = $lang->get("LANG_WIW_FILE_UNKNOWN");
break;
default:
if ($wbbuserdata['a_can_use_acp']==1 && $wbbuserdata['a_acp_or_mcp']==1) {
$dateiname = $this->useronlinecache[$this->counter]['script'];
$location = $lang->get("LANG_WIW_FILE_UNKNOWN_SONDER", array('$dateiname' => $dateiname));
} else {
$location = $lang->get("LANG_WIW_FILE_UNKNOWN");
}
}
$this->useronlinecache[$this->counter]['location'] = $location;
return $this->useronlinecache[$this->counter];
}
else return $this->get();
}
else return ;
}
}
?> |
|
__________________
|
|
25.01.2007 13:04 |
|
|
|
So schauts aus Viktor, hab ich drinnen!
Testweise grad mal raus genommen und schon klappte die normale Anzeige wieder.
Blöd (so was fällt mir nach fast 2 Jahren erst auf
), gibts da ne Lösung für?
Im übrigen, wenn ich schon mal dabei bin, hier im Forum ist neben der Useronlineanzeige auch noch der der Zusatz "heute waren xx Mitglieder im Forum"!
Wie geht das? Über das Portal oder mit ner eigenen PHP? Verrätst du den Code
?
LG Franzis
__________________
|
|
26.01.2007 14:17 |
|
|
|
Muss das mal puschen
Weils mir auch grad aufgefallen ist
__________________
|
|
15.05.2011 23:39 |
|
|
|
Idee, die mir dazu einfällt, um das Problem zu lösen:
- Trägt sich ein User auf dem Locator ein, wird die Minikarte als eigene Grafik erstellt und in einem extra Unterordner auf dem Server gespeichert (Dateiname z.B. "minilocator_userid.png" )
Beim Profilaufruf wird dann die Grafik geladen, und nicht der Link zur locator.php, wodurch der Fehler ja anscheinend verursacht wird.
- Löscht sich der User aus dem Locator, wird auch die entsprechende Grafik vom Server gelöscht...
Könntest du das so umsetzen, Viktor ? Ich kenn mich damit nicht wirklich aus
Greetz
Günni
__________________
|
|
24.05.2011 21:22 |
|
|
|
Hab es jetzt nicht ausprobiert, aber so kann es doch nicht funzen ?
$filename ist ja die Variable fürs wiw, also müsste man doch eher den referer auslesen ?
Allerdings bleibt dann immer noch das Problem, dass über das Profil die locator.php aufgerufen wird, auch wenn $filename einen anderen Inhalt hat...
Ich denke, die beste Lösung wäre wirklich die eigene Grafik, ausserdem ist es ja auch serverschonender, wenn die Grafik nicht immer neu generiert und angezeigt wird, sondern einfach aufgerufen wird, oder ?
Greetz
Günni
__________________
|
|
24.05.2011 21:50 |
|
|
Viktor
Administrator
Zeige Viktor auf Karte
Dabei seit: 15.08.2003
Beiträge: 31.570
363 Filebase-Einträge
Alter: 66 Jahre
Herkunft: NRW wBB-Version: wBB2.3 PHP-Version: 7.4.33 MySQL-Version: 10.5.19-MariaDB Wo bist du gehostet?: eigener Server
Bewertung:
Level: 71 [?]
Erfahrungspunkte: 237.756.782
Nächster Level: 266.777.854
|
|
|
Zitat: Original von batida444
Hab es jetzt nicht ausprobiert, aber so kann es doch nicht funzen ?
$filename ist ja die Variable fürs wiw, also müsste man doch eher den referer auslesen ?
Allerdings bleibt dann immer noch das Problem, dass über das Profil die locator.php aufgerufen wird, auch wenn $filename einen anderen Inhalt hat...
Ich denke, die beste Lösung wäre wirklich die eigene Grafik, ausserdem ist es ja auch serverschonender, wenn die Grafik nicht immer neu generiert und angezeigt wird, sondern einfach aufgerufen wird, oder ?
Greetz
Günni |
|
|
Hallo,
jo ich muss es mal testen ob es so geht.
Mit dem Bild auf dem Server ablegen muss ich auch mal testen.
Gruß
Viktor
__________________
Ein kluger Mann widerspricht keiner Frau. Er wartet, bis sie es selbst tut.
... beim Käfer (WBB2) konnte man noch selber schrauben,
beim neuen Golf (WBB3) muß man fast schon in die Werkstatt wenn man das "Wischwasser" nachfüllen muss!
Da fast keiner mehr hier Postet gibt es ab sofort keinen Support mehr per PN.
|
|
24.05.2011 21:56 |
|
|
|
Wäre super, wenn du das hinkriegen würdest
Danke schonmal für deine Mühe
__________________
|
|
24.05.2011 22:20 |
|
|
|
Hab es selber hinbekommen
Ist zwar vielleicht nicht das sauberste, aber es funzt.
Umbauanleitung:
- Verzeichnis erstellen /images/locator und die Rechte 777 geben
Öffne locator.php
Suche im Abschnitt:
folgendes:
php: |
1:
|
$db->query("DELETE FROM bb".$n."_wlw WHERE userid = '$userid'"); |
|
und füge darunter ein:
php: |
1:
|
@unlink("./images/locator/minilocator_".$userid.".png"); |
|
Ersetze den kompletten Abschnitt von
bis zum dazugehörigen
mit diesem hier:
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:
|
case "save_new": $x = intval($_GET['x']);
$y = intval($_GET['y']);
$postal = wbb_trim($_GET['postal']);
$location = wbb_trim($_GET['location']);
$userid = $wbbuserdata['userid'];
$result = $db->query("SELECT userid FROM bb".$n."_wlw WHERE userid = '$userid'");
if($userid && !mysql_num_rows($result)){
$db->query("INSERT INTO bb".$n."_wlw (userid,x,y,postal,location) VALUES ('".$userid."','".$x."','".$y."','".addslashes($postal)."','".addslashes($location)."')");
// Bild auf dem Server speichern
$im = @ImageCreateFromJPEG("locator/locator.jpg");
$im_maxX = @imagesx($im);
$im_maxY = @imagesy($im);
$star = @ImageCreateFromPNG('locator/mark.png');
$starX = @imagesx($star);
$starY = @imagesy($star);
$newY = '150';
$newX = ($im_maxX * $newY) / $im_maxY;
$starmulti = $im_maxY / $newY;
unset($starsize);
$starsize = "10" * $starmulti;
@imagecopyresized($im, $star, $x-($starsize/2), $y-($starsize/2), 0, 0, $starsize, $starsize, $starX, $starY);
$om = @ImageCreate($newX, $newY);
@imagecopyresized($om, $im, 0, 0, 0, 0, $newX, $newY, $im_maxX, $im_maxY);
ImageDestroy($im);
ImageDestroy($star);
Header( "Content-type: image/PNG" );
imagePNG($om,'./images/locator/minilocator_'.$userid.'.png');
ImageDestroy($om);
// Bild auf dem Server speichern
header("Location: locator.php?action=\"\"$SID_ARG_2ND");
}
else header("Location: locator.php?error=true$SID_ARG_2ND");
break; |
|
Der Abschnitt
kann komplett gelöscht werden, da überflüssig.
Jetzt noch im Template profile.tpl den entsprechenden Aufruf des Bildes von
bis
durch diesen hier ersetzen:
code: |
1:
|
<a href="locator.php?action=image_uid&userid=$user_info[userid]{$SID_ARG_2ND}"><img src="images/locator/minilocator_$user_info[userid].png" border="0" alt="" title="" /></a> |
|
und schon sollte es klappen
Zumindest tut es das bei mir.
Jetzt müssen nur noch die User darauf hingewiesen werden, dass sie ihren Wohnort in der Karte einmal löschen und dann neu eintragen müssen, und dann is alles schicki
Und die Anzeige im wiw klappt auch wieder
Greetz
Günni
__________________
|
|
24.05.2011 23:17 |
|
|
Viktor
Administrator
Zeige Viktor auf Karte
Dabei seit: 15.08.2003
Beiträge: 31.570
363 Filebase-Einträge
Alter: 66 Jahre
Herkunft: NRW wBB-Version: wBB2.3 PHP-Version: 7.4.33 MySQL-Version: 10.5.19-MariaDB Wo bist du gehostet?: eigener Server
Bewertung:
Level: 71 [?]
Erfahrungspunkte: 237.756.782
Nächster Level: 266.777.854
|
|
|
25.05.2011 20:33 |
|
|
|
|
|
|