Modyfikacja forum - Pan Kontekstualny
|
soldier175 |
Dodany dnia 28.07.2006 20:13:29
|
Przedszkolak
Postów: 93
Data rejestracji: 03.04.2006 10:11
ZBANOWANY: Dożywotnio
|
Spoko, tylko że mi się wyświetla reklama pod każdym postem
Muszę coś jeszcze zmodyfikować, czy poprostu coś pochrzaniłem ? |
|
|
|
Wścibski Gość |
Dodany dnia 23.11.2024 11:31:09
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
Pieka |
Dodany dnia 28.07.2006 20:18:07
|
Postów: 19882 Pomógł: 767
v7.02.03 Data rejestracji: 23.02.2005 18:12
|
Optowalbym za druga wersja
Jestem jaki jestem
|
|
|
|
m_i_n |
Dodany dnia 28.07.2006 23:53:42
|
Bywalec
Postów: 836 Pomógł: 3
Data rejestracji: 15.02.2006 10:04
|
Jesli chodzi o moje rozwiazanie podane pare postow wyzej to w najnowszym fusionie nie zadziala, do obecnego trzeba zrobic to :D :
modyfikujemy: forum/viewthread.php
wyszukujemy cos takiego:
...
}
echo "<a href='".BASEDIR."messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='".$locale['571']."' style='border:0px;'></a>
</td>
</tr>\n";
}
}
echo "</table>\n";
if ($rows > $posts_per_page) {
...
i zmieniamy na:
...
}
echo "<a href='".BASEDIR."messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='".$locale['571']."' style='border:0px;'></a>
</td>
</tr>\n";
// ----------------------------------------
// AdSense
// ----------------------------------------
if (!($mod_adsense === true)) {
echo "<tr>
<td width='145' class='tbl2' colspan='2'>Reklama</td>
</tr>
<tr>
<td align='center' class='tbl1' colspan='2'>
<script type='text/javascript'><!--
google_ad_client = 'pub-5943083147296751';
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = '468x60_as';
google_ad_type = 'text';
google_ad_channel ='';
google_color_border = 'FAFAFA';
google_color_link = '000000';
google_color_bg = 'FAFAFA';
google_color_text = '000000';
google_color_url = '0040D0';
//--></script>
<script type='text/javascript'
src='http://pagead2.googlesyndication.com/pagead/show_ads.js'>
</script>
</td>
</tr>\n";
$mod_adsense = true;
}
// ----------------------------------------
}
}
echo "</table>\n";
if ($rows > $posts_per_page) {
...
...oczywiscie wklejajac odpowiedni kod dla adsense :) ale tego mowic juz chyba nie musze.
Przedstawiona tu modyfikacja jest inna niz ta na supporcie (bo powstala duzo wczesniej) a to jak wyglada mozna zobaczyc na mojej stronie (wg. mnie jest bardziej dyskretna :) ).
Edytowane przez m_i_n dnia 29.07.2006 00:22:54
|
|
|
|
K@iTO |
Dodany dnia 17.08.2006 21:03:03
|
Początkujący
Postów: 102
Data rejestracji: 08.08.2005 21:19
|
super sprawa teraz mam takie male pytanko
tego usera nalezy stwozyć? tak po prostu usera ktos.... i potem jego Id wykozystywać do komunikacji tak?
|
|
|
|
crasch |
Dodany dnia 17.08.2006 21:08:27
|
Zaawansowany
Postów: 1473
Data rejestracji: 02.01.2005 01:21
|
Nie, a zresztą co Ci będe tłumaczył wszystko masz opisane w tym temacie - może byś raczył przeczytać?
pozdro
..i to by było na tyle.
28 listopada 2006
|
|
|
|
m_i_n |
Dodany dnia 17.08.2006 22:39:45
|
Bywalec
Postów: 836 Pomógł: 3
Data rejestracji: 15.02.2006 10:04
|
crasch -> metoda opisana przezemnie w tym temacie calkowicie innaczej sie reprezentuje niz ta na supporcie IMHO jest duzo lepsza ale to juz sprawa gustu.
|
|
|
|
baczek007 |
Dodany dnia 19.08.2006 05:22:27
|
Przedszkolak
Postów: 19 Ostrzeżeń: 1
Data rejestracji: 10.02.2006 19:52
|
@m_i_n czy byłbyś tak dobry i mógłbyś opisać sposób na dodanie wirtualnego użytkownika do Twojej modyfikacji ? tak jak to jest zrobione na tym forum.
A tak w ogóle to dzięki za tego moda, myslę, że sporo osób z niego skorzysta i tym sposobem ludzie rozsiani po całej Polsce będą dłużni Ci piwko
Edytowane przez baczek007 dnia 19.08.2006 06:24:00
|
|
|
|
SebaZ |
Dodany dnia 19.08.2006 08:53:16
|
Zaawansowany
Postów: 1598 Pomógł: 2
Data rejestracji: 10.11.2004 22:39
|
hehe, jaka wazelina
A co do tematu: przejzyj i przeczytaj ten temat od deski do deskli i będziesz wiedziałwszytsko co Ci potrzebne
Zadawanie pytań na forum to nie jest prawo, to jest przywilej, którego każdy może być pozbawiony jeżeli nie będzie umiał z niego korzystać. Nie wymagaj więc natychmiastowej odpowiedzi.
|
|
|
|
m_i_n |
Dodany dnia 19.08.2006 10:17:10
|
Bywalec
Postów: 836 Pomógł: 3
Data rejestracji: 15.02.2006 10:04
|
Szczerze mowiac nie bawilem sie az tak by wygladalo to tak jakby to user pisal, bardziej mi odpowiadalo to co podalem, ale to przeciez tylko kwestia odpowiedniej modyfikacji mojego kodu by przypominalo zwykly post. Nie trzeba zadnego usera nigdzie dodawac.
|
|
|
|
sem3k |
Dodany dnia 28.08.2006 19:43:55
|
Przedszkolak
Postów: 9
Data rejestracji: 07.10.2005 22:50
|
Co muszę zrobić, aby reklama wyświetlała się pod ostatnim postem?
Próbowałem, zrobić if ($i == 10). Jednak nic z tego. Moja wersja fusiona 6.00.307
Edytowane przez sem3k dnia 28.08.2006 21:19:49
|
|
|
|
m_i_n |
Dodany dnia 29.08.2006 09:04:59
|
Bywalec
Postów: 836 Pomógł: 3
Data rejestracji: 15.02.2006 10:04
|
Ty mowisz o poprzednim modzie, wlasnie do tej wersji ktora masz. A probowales 9? nie mam mozliwosci sprawdzenia i teraz strzelam. Wtedy reklama powinna byc miedzy ost. a przed ost. Zeby dac calkiem za ost. to trzeba by troszke innaczej to zrealizowac.
|
|
|
|
sem3k |
Dodany dnia 29.08.2006 16:07:31
|
Przedszkolak
Postów: 9
Data rejestracji: 07.10.2005 22:50
|
Dzięki za zainteresowanie się problemem. Reklama wyświetla mi się pod 9 ja jednak chciałbym, aby wyświetlała mi się pod ostatnim. Kombinowałem coś takiego, że if ($i == strlen($i)) i potym kod adsense. Jednak funkcja strlen() jest dla ciągów, a ja chciałbym taką funkcję tylko dla typu integer. Jest takie coś ? Na razie jedynie co zrobiłem to wyświetlanie reklamy w losowym miejscu oto kod: (wiem, że nie ma się czym chwalić, ale może się komuś przyda)
$randAdSense = rand(2, 20);
if ($i === $randAdSense) {
echo "<tr>
<td width='145' class='tbl2' colspan='2'>Reklama</td>
</tr>
<tr>
<td align='center' class='tbl1' colspan='2'>
<script type='text/javascript'><!--
google_ad_client = 'pub-6529929676079614';
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = '728x90_as';
google_ad_type = 'image';
google_ad_channel ='';
google_color_border = '6D6D6D';
google_color_bg = '696969';
google_color_link = 'C6C6C6';
google_color_text = 'C6C6C6';
google_color_url = 'AAAAAA';
//--></script>
<script type='text/javascript'
src='http://pagead2.googlesyndication.com/pagead/show_ads.js'>
</script>
</td>
</tr>\n";
}
Edytowane przez sem3k dnia 29.08.2006 16:11:32
|
|
|
|
Pieka |
Dodany dnia 29.08.2006 16:29:29
|
Postów: 19882 Pomógł: 767
v7.02.03 Data rejestracji: 23.02.2005 18:12
|
K@iTO napisał/a:
super sprawa teraz mam takie male pytanko
tego usera nalezy stwozyć? tak po prostu usera ktos.... i potem jego Id wykozystywać do komunikacji tak?
Nie. Po co?
To jest sztywny kod wyswietlany z pliku, a nie bazy.
Jestem jaki jestem
|
|
|
|
sem3k |
Dodany dnia 30.08.2006 10:19:19
|
Przedszkolak
Postów: 9
Data rejestracji: 07.10.2005 22:50
|
Już wiem jak zrobić aby reklama była pod ostatnim postem.
modyfikujemy: forum/viewthread.php
wyszukujemy cos takiego:
...
}
echo "<a href='".BASEDIR."messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='".$locale['571']."' style='border:0px;'></a>
</td>
</tr>\n";
}
}
echo "</table>\n";
if ($rows > $posts_per_page) {
...
i zmieniamy na:
}
echo "<a href='".BASEDIR."messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='".$locale['571']."' style='border:0px;'></a>
</td>
</tr>\n";
}
}
//------------------KOD ADSENSE
echo" KOD ADSNENSE";
//------------------KOD ADSENSE
echo "</table>\n";
if ($rows > $posts_per_page) {
...
Można spróbować wstawić kod wcześniej tam gdzie proponował m_i_n i dać warunek wyjściowy dla pętli czyli $data = dbarray($result) całość mniej więcej wyglądała by tak :
}
echo "<a href='".BASEDIR."messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='".$locale['571']."' style='border:0px;'></a>
</td>
</tr>\n";
if ($data == dbarray($result)) {
echo"ADSENSE";
}
}
}
echo "</table>\n";
if ($rows > $posts_per_page) {
...
Jednak nie wiem czy by to zadziałało bo nie testowałem. Pierwszy sposób działa u mnie prawidłowo. |
|
|
|
gateway |
Dodany dnia 24.09.2006 20:34:34
|
Początkujący
Postów: 119 Ostrzeżeń: 1
Data rejestracji: 04.02.2006 09:07
Złamana licencja
|
Mam pytanie który kod mam wstawić, abyw najnowszej wersji działała mi reklama google na forum albo chciałbym aby wyświetlało się to tak jak tu w supporcie, bo próbowałem te kody, ale one są inne mam wesje 6.01.5 |
|
|
|
MaChoni |
Dodany dnia 13.01.2007 12:44:59
|
Przedszkolak
Postów: 50 Ostrzeżeń: 3
v7.00.05 Data rejestracji: 15.06.2006 14:00
|
Witam, jak ja wstawian kod z http://www.adbid.pl/ to wyskakuje błąd.
Mam do was prośbe poniżej dałem kod z forum i kod reklamy jak by ktoś mógł to wstawić już gotowe, był bym bardzo wdzięczny...
Kod reklamy:
<script language="JavaScript" type="text/javascript" src="http://www.adbid.pl/afiliat/r_show.php?kan=3085&a=3012&s=2837&kat=5&k=1&sz=1"></script><noscript><a href="http://www.adbid.pl">internet praca pieniądze reklama</a></noscript>
Kod viewthread.php
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright ę 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "../maincore.php";
require_once INCLUDES."forum_functions_include.php";
require_once BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";
include LOCALE.LOCALESET."forum/main.php";
$posts_per_page = 20;
if (!FUSION_QUERY || !isset($forum_id) || !isNum($forum_id) || !isset($thread_id) || !isNum($thread_id)) fallback("index.php");
$result = dbquery(
"SELECT f.*, f2.forum_name AS forum_cat_name
FROM ".$db_prefix."forums f
LEFT JOIN ".$db_prefix."forums f2 ON f.forum_cat=f2.forum_id
WHERE f.forum_id='".$forum_id."'"
);
if (dbrows($result)) {
$fdata = dbarray($result);
if (!checkgroup($fdata['forum_access']) || !$fdata['forum_cat']) fallback("index.php");
} else {
fallback("index.php");
}
$can_post = checkgroup($fdata['forum_posting']);
//FORUM MODS GROUPS
$forum_mods = explode(".", $fdata['forum_moderators']);
$user_groups = explode(".", $userdata['user_groups']);
$forum_mods_group = false;
for ($i=0;$i<count($user_groups);$i++) {
if (in_array("G".$user_groups[$i], $forum_mods)) $forum_mods_group = true;
}
if (iMEMBER && (in_array($userdata['user_id'], $forum_mods) || $forum_mods_group)) {
define("iMOD", true);
} else {
define("iMOD", false);
}
//FORUM MODS GROUPS
//$forum_mods = explode(".", $fdata['forum_moderators']);
//if (iMEMBER && in_array($userdata['user_id'], $forum_mods)) { define("iMOD", true); } else { define("iMOD", false); }
$result = dbquery("SELECT * FROM ".$db_prefix."threads WHERE thread_id='".$thread_id."' AND forum_id='".$fdata['forum_id']."'");
if (dbrows($result)) { $tdata = dbarray($result); } else { fallback("index.php"); }
$caption = $fdata['forum_cat_name']." | <a href='viewforum.php?forum_id=".$fdata['forum_id']."'>".$fdata['forum_name']."</a>";
$result = dbquery("UPDATE ".$db_prefix."threads SET thread_views=thread_views+1 WHERE thread_id='$thread_id'");
if (iMEMBER && $can_post && isset($_POST['postquickreply'])) {
$flood = false;
$message = stripinput(censorwords($_POST['message']));
if ($message != "") {
$result = dbquery("SELECT MAX(post_datestamp) AS last_post FROM ".$db_prefix."posts WHERE post_author='".$userdata['user_id']."'");
if (dbrows($result) > 0) {
$data = dbarray($result);
if ((time() - $data['last_post']) < $settings['flood_interval']) {
$flood = true;
$result = dbquery("INSERT INTO ".$db_prefix."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
$result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
}
fallback("viewforum.php?forum_id=$forum_id");
}
}
if (!$flood) {
$sig = ($userdata['user_sig'] ? '1' :'0');
$smileys = isset($_POST['disable_smileys']) ? "0" : "1";
$subject = "RE: ".$tdata['thread_subject'];
$result = dbquery("UPDATE ".$db_prefix."forums SET forum_lastpost='".time()."', forum_lastuser='".$userdata['user_id']."' WHERE forum_id='$forum_id'");
$result = dbquery("UPDATE ".$db_prefix."threads SET thread_lastpost='".time()."', thread_lastuser='".$userdata['user_id']."' WHERE thread_id='$thread_id'");
$result = dbquery("INSERT INTO ".$db_prefix."posts (forum_id, thread_id, post_subject, post_message, post_showsig, post_smileys, post_author, post_datestamp, post_ip, post_edituser, post_edittime) VALUES ('$forum_id', '$thread_id', '$subject', '$message', '$sig', '$smileys', '".$userdata['user_id']."', '".time()."', '".USER_IP."', '0', '0')");
$newpost_id = mysql_insert_id();
$result = dbquery("UPDATE ".$db_prefix."users SET user_posts=user_posts+1 WHERE user_id='".$userdata['user_id']."'");
redirect("postify.php?post=reply&error=0&forum_id=$forum_id&thread_id=$thread_id&post_id=$newpost_id");
}
}
}
opentable($locale['500']);
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='smallalt'><a href='index.php'>".$settings['sitename']."</a> | $caption</td>\n";
if (iMEMBER && $can_post) {
echo "<td align='right'>\n";
if (!$tdata['thread_locked']) {
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=$thread_id'><img src='".THEME."forum/reply.gif' alt='".$locale['565']."' style='border:0px;'></a>\n";
}
echo "<a href='post.php?action=newthread&forum_id=$forum_id'><img src='".THEME."forum/newthread.gif' alt='".$locale['566']."' style='border:0px;'></a></td>\n";
}
echo "</tr>
</table>\n";
$rows = dbcount("(thread_id)", "posts", "thread_id='$thread_id'");
if (isset($pid) && isNum($pid)) {
$reply_count = dbcount("(post_id)", "posts", "thread_id='".$tdata['thread_id']."' AND post_id<='".$pid."'");
if ($reply_count > $posts_per_page) $rowstart = ((ceil($reply_count / $posts_per_page)-1)*$posts_per_page);
}
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows > $posts_per_page) {
echo "<div align='center' style='margin-top:5px;margin-bottom:5px;'>
".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&")."
</div>\n";
}
echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
if ($rows != 0) {
$result = dbquery(
"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name FROM ".$db_prefix."posts p
LEFT JOIN ".$db_prefix."forum_attachments fa USING(post_id)
LEFT JOIN ".$db_prefix."users u ON p.post_author = u.user_id
LEFT JOIN ".$db_prefix."users u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
WHERE p.thread_id='$thread_id' ORDER BY post_datestamp LIMIT $rowstart,$posts_per_page"
);
$numrows = dbrows($result);
while ($data = dbarray($result)) {
$message = $data['post_message'];
if ($data['post_showsig']) { $message = $message."\n\n<hr>".$data['user_sig']; }
if ($data['post_smileys']) { $message = parsesmileys($message); }
$message = parseubb($message);
$message = nl2br($message);
if ($data['post_edittime'] != "0") {
$edituser = "<a href='../profile.php?lookup=".$data['post_edituser']."'>".$data['edit_name']."</a>";
$edittime = showdate("forumdate", $data['post_edittime']);
}
//FORUM MODS GROUPS
unset($user_groups);
$user_groups = explode(".", $data['user_groups']);
$forum_mods_group = false;
for ($i=0;$i<count($user_groups);$i++) {
if (in_array("G".$user_groups[$i], $forum_mods)) $forum_mods_group = true;
}
$is_mod = (in_array($data['user_id'], $forum_mods) || $forum_mods_group) && $data['user_level'] < "102" ? true : false;
//FORUM MODS GROUPS
//$is_mod = in_array($data['user_id'], $forum_mods) && $data['user_level'] < "102" ? true : false;
echo "<tr>
<td width='145' class='tbl2'>".$locale['501']."</td>
<td class='tbl2'><a name='post_".$data['post_id']."' id='post_".$data['post_id']."'></a>".$data['post_subject']."</td>
</tr>
<tr>
<td valign='top' rowspan='3' width='145' class='tbl1'>
<a href='../profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a><br>
<span class='alt'>".($is_mod ? $locale['userf1'] : getuserlevel($data['user_level']))."</span><br><br>\n";
if ($data['user_avatar'] != "") {
echo "<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$locale['567']."'><br><br>\n";
$height = "185";
} else {
$height = "70";
}
echo "<span class='alt'>".$locale['502']."</span> ".$data['user_posts']."<br>\n";
if ($data['user_location']) echo "<span class='alt'>".$locale['503']."</span> ".$data['user_location']."<br>\n";
echo "<span class='alt'>".$locale['504']."</span> ".showdate("%d.%m.%y", $data['user_joined'])."</td>
<td>
<table cellspacing='0' cellpadding='0' width='100%'>
<tr>
<td class='tbl1'>".$locale['505'].showdate("forumdate", $data['post_datestamp'])."</td>
<td align='right' class='tbl1'>\n";
if (iMEMBER && $can_post) {
if (!$tdata['thread_locked']) {
if ($userdata['user_id'] == $data['post_author'] || iMOD || iSUPERADMIN) {
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' alt='".$locale['568']."' style='border:0px;'></a>\n";
}
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id'].""e=".$data['post_id']."'><img src='".THEME."forum/quote.gif' alt='".$locale['569']."' style='border:0px;'></a>\n";
if (iMOD || iSUPERADMIN && $data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) echo "<img src='".THEME."forum/ip.gif' alt='".$locale['570']."' title='".$data['post_ip']."' style='border:0px;'>\n";
} else {
if (iMOD || iSUPERADMIN) {
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' alt='".$locale['568']."' style='border:0px;'></a>\n";
if ($data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) echo "<img src='".THEME."forum/ip.gif' alt='".$locale['570']."' title='".$data['post_ip']."' style='border:0px;'>\n";
}
}
}
echo "</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign='top' height='$height' class='tbl1'>
$message";
if ($data['attach_id']) {
if (in_array($data['attach_ext'], $imagetypes) && @getimagesize(FORUM."attachments/".$data['attach_name'])) {
echo "<hr>\n".$data['user_name'].$locale['506']."<br><br>\n<img src='".FORUM."attachments/".$data['attach_name']."'>";
} else {
echo "<hr>\n".$data['user_name'].$locale['507']."<br>\n<a href='".FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&getfile=".$data['post_id']."'>".$data['attach_name']."</a>";
}
}
if ($data['post_edittime'] != "0") {
echo "<hr>\n".$locale['508'].$edituser.$locale['509']."$edittime";
}
echo "</td>
</tr>
<tr>
<td class='tbl1'>\n";
if ($data['user_aim'] && file_exists(THEME."forum/aim.gif")) {
echo "<a href='aim:goim?screenname=".str_replace(" ", "+", $data['user_aim'])."' target='_blank'><img src='".THEME."forum/aim.gif' alt='".$data['user_aim']."' style='border:0px;'></a> ";
}
if ($data['user_icq']) {
echo "<a href='http://web.icq.com/wwp?Uin=".$data['user_icq']."' target='_blank'><img src='".THEME."forum/icq.gif' alt='".$data['user_icq']."' style='border:0px;'></a> ";
}
if ($data['user_msn']) {
echo "<a href='mailto:$data[user_msn]'><img src='".THEME."forum/msn.gif' alt='".$data['user_msn']."' style='border:0px;'></a> ";
}
if ($data['user_yahoo']) {
echo "<a href='http://uk.profiles.yahoo.com/$data[user_yahoo]' target='_blank'><img src='".THEME."forum/yahoo.gif' alt='".$data['user_yahoo']."' style='border:0px;'></a> ";
}
if ($data['user_web']) {
if (!strstr($data['user_web'], "http://")) { $urlprefix = "http://"; } else { $urlprefix = ""; }
echo "<a href='".$urlprefix."".$data['user_web']."' target='_blank'><img src='".THEME."forum/web.gif' alt='".$data['user_web']."' style='border:0px;'></a> ";
}
echo "<a href='".BASEDIR."messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='".$locale['571']."' style='border:0px;'></a>
</td>
</tr>\n";
}
}
echo "</table>\n";
if ($rows > $posts_per_page) {
echo "<div align='center' style='margin-top:5px;'>
".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&")."
</div>\n";
}
echo "<table cellpadding='0' cellspacing='0' width='100%' style='margin-top:5px;'>\n<tr>\n";
$forum_list = ""; $current_cat = "";
$result = dbquery(
"SELECT f.forum_id, f.forum_name, f2.forum_name AS forum_cat_name
FROM ".$db_prefix."forums f
INNER JOIN ".$db_prefix."forums f2 ON f.forum_cat=f2.forum_id
WHERE ".groupaccess('f.forum_access')." AND f.forum_cat!='0' ORDER BY f2.forum_order ASC, f.forum_order ASC"
);
while ($data = dbarray($result)) {
if ($data['forum_cat_name'] != $current_cat) {
if ($current_cat != "") $forum_list .= "</optgroup>\n";
$current_cat = $data['forum_cat_name'];
$forum_list .= "<optgroup label='".$data['forum_cat_name']."'>\n";
}
$sel = ($data['forum_id'] == $fdata['forum_id'] ? " selected" : "");
$forum_list .= "<option value='".$data['forum_id']."'$sel>".$data['forum_name']."</option>\n";
}
$forum_list .= "</optgroup>\n";
echo "<td align='left' class='tbl'>".$locale['540']."<br>
<select name='jump_id' class='textbox' onChange=\"jumpForum(this.options[this.selectedIndex].value);\">
$forum_list</select></td>\n";
if (iMEMBER && $can_post) {
if (iMOD || iSUPERADMIN) {
echo "<td align='right' class='tbl'>
<form name='modopts' method='post' action='options.php?forum_id=$forum_id&thread_id=$thread_id'>
".$locale['520']."<br>
<select name='step' class='textbox'>
<option value='none'> </option>
<option value='renew'>".$locale['527']."</option>
<option value='delete'>".$locale['521']."</option>\n";
if (!$tdata['thread_locked']) {
echo "<option value='lock'>".$locale['522']."</option>\n";
} else {
echo "<option value='unlock'>".$locale['523']."</option>\n";
}
if (!$tdata['thread_sticky']) {
echo "<option value='sticky'>".$locale['524']."</option>\n";
} else {
echo "<option value='nonsticky'>".$locale['525']."</option>\n";
}
echo "<option value='move'>".$locale['526']."</option>\n";
echo "</select>
<input type='submit' name='go' value='".$locale['528']."' class='button'>
</form>
</td>
</tr>\n";
}
}
echo "</table>\n";
if (iMEMBER) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
if ($settings['thread_notify']) {
echo "<td valign='top' class='tbl'>";
if (dbcount("(thread_id)", "thread_notify", "thread_id='$thread_id' AND notify_user='".$userdata['user_id']."'")) {
$result = dbquery("UPDATE ".$db_prefix."thread_notify SET notify_datestamp='".time()."', notify_status='1' WHERE thread_id='$thread_id' AND notify_user='".$userdata['user_id']."'");
$notify_link = "<a href='postify.php?post=off&forum_id=$forum_id&thread_id=$thread_id'>".$locale['515']."</a>";
} else {
$notify_link = "<a href='postify.php?post=on&forum_id=$forum_id&thread_id=$thread_id'>".$locale['516']."</a>";
}
echo "$notify_link</td>\n";
}
if ($can_post) {
echo "<td align='right' class='tbl'>";
if (!$tdata['thread_locked']) {
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=$thread_id'><img src='".THEME."forum/reply.gif' alt='".$locale['565']."' style='border:0px;'></a>\n";
}
echo "<a href='post.php?action=newthread&forum_id=$forum_id'><img src='".THEME."forum/newthread.gif' alt='".$locale['566']."' style='border:0px;'></a>\n";
echo "</td>\n";
}
echo "</tr>\n</table>\n";
}
closetable();
tablebreak();
if (iMEMBER && $can_post && !$tdata['thread_locked']) {
opentable($locale['512']);
echo "<form name='inputform' method='post' action='".FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id'>
<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td align='center' class='tbl1'><textarea name='message' cols='80' rows='7' class='textbox'></textarea><br>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('message', '[b]', '[/b]');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('message', '[i]', '[/i]');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('message', '[u]', '[/u]');\">
<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('message', '[url]', '[/url]');\">
<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('message', '[mail]', '[/mail]');\">
<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('message', '[img]', '[/img]');\">
<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('message', '[center]', '[/center]');\">
<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('message', '[small]', '[/small]');\">
<input type='button' value='code' class='button' style='width:40px;' onClick=\"addText('message', '[code]', ' ');\">
<input type='button' value='quote' class='button' style='width:45px;' onClick=\"addText('message', '', ' ');\"></td>
</tr>
<tr>
<td align='center' class='tbl2'>".displaysmileys("message")."<br>
<input type='checkbox' name='disable_smileys' value='1'>".$locale['513']."</td>
</tr>
<tr>
<td align='center' class='tbl1'><input type='submit' name='postquickreply' value='".$locale['514']."' class='button'></td>
</tr>
</table>
</form>\n";
closetable();
}
echo "<script type='text/javascript'>
function jumpForum(forumid) {
document.location.href='".FORUM."viewforum.php?forum_id='+forumid;
}
</script>\n";
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?>[/code]
Pozdrawiam i z góry dziękuje... ;)
|
|
|
|
djbambo |
Dodany dnia 04.02.2007 11:26:48
|
Przedszkolak
Postów: 4
Data rejestracji: 04.02.2007 10:06
|
Witam chciałem prosić o pomoc. Nie znam sie niestety na php ( dopiero się ucze ) i chcialem wlasnie takie coś jak opisana technika w tym temacie zrobic. jednak nie moge sobie poradzic.
Moj plik viewthread jest troszke inny - zapewne przez niektore wtyczki jakie posiadam.
Dlatego podaje wam kod tego wlasnie mego pliku i bardzo prosze o pomoc - tzn o podanie kodu, bede bardzo wdzieczny pozdrawiam.
Kod:
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "../maincore.php";
require_once INCLUDES."forum_functions_include.php";
require_once BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";
include LOCALE.LOCALESET."forum/main.php";
include LOCALE.LOCALESET."fusionboard.php";
include INFUSIONS."wob_rank_system/func/func.php";
require_once INCLUDES."comments_include.php";
require_once INCLUDES."ratings_include.php";
include FORUM."includes/warning_include.php";
include FORUM."includes/forum_includes.php";
$fboardControl = dbarray(dbquery("SELECT * FROM ".$db_prefix."fboard_control"));
if (file_exists(FORUM."locale/".$settings['locale'].".php")) {
include FORUM."locale/".$settings['locale'].".php";
} else {
include FORUM."locale/English.php";
}
$posts_per_page = 20;
update_warning();
if (!FUSION_QUERY || !isset($forum_id) || !isNum($forum_id) || !isset($thread_id) || !isNum($thread_id)) fallback("index.php");
$result = dbquery(
"SELECT f.*, f2.forum_name AS forum_cat_name
FROM ".$db_prefix."forums f
LEFT JOIN ".$db_prefix."forums f2 ON f.forum_cat=f2.forum_id
WHERE f.forum_id='".$forum_id."'"
);
if (dbrows($result)) {
$fdata = dbarray($result);
if (!checkgroup($fdata['forum_access']) || !$fdata['forum_cat']) fallback("index.php");
} else {
fallback("index.php");
}
$can_post = checkgroup($fdata['forum_posting']);
$can_reply = checkgroup($fdata['forum_reply']);
$can_edit = $fdata['forum_edit'];
if(isset($_GET['style']) && is_numeric($_GET['style'])){ $style=$_GET['style']; }else{ $style = $fboardControl['fbc_view']; }
$forum_mods = explode(".", $fdata['forum_moderators']);
if (iMEMBER && in_array($userdata['user_id'], $forum_mods)) { define("iMOD", true); } else { define("iMOD", false); }
$result = dbquery("SELECT * FROM ".$db_prefix."threads WHERE thread_id='".$thread_id."' AND forum_id='".$fdata['forum_id']."'");
if (dbrows($result)) { $tdata = dbarray($result); } else { fallback("index.php"); }
$caption = $fdata['forum_cat_name']." | <a href='viewforum.php?forum_id=".$fdata['forum_id']."'>".$fdata['forum_name']."</a>";
$result = dbquery("UPDATE ".$db_prefix."threads SET thread_views=thread_views+1 WHERE thread_id='$thread_id'");
if (iMEMBER && $can_reply && isset($_POST['postquickreply'])) {
$flood = false;
$message = stripinput(censorwords($_POST['message']));
if ($message != "") {
$result = dbquery("SELECT MAX(post_datestamp) AS last_post FROM ".$db_prefix."posts WHERE post_author='".$userdata['user_id']."'");
if (dbrows($result) > 0) {
$data = dbarray($result);
if ((time() - $data['last_post']) < $settings['flood_interval']) {
$flood = true;
$result = dbquery("INSERT INTO ".$db_prefix."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
$result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
}
fallback("viewforum.php?forum_id=$forum_id");
}
}
if (!$flood) {
$sig = ($userdata['user_sig'] ? '1' :'0');
$smileys = isset($_POST['disable_smileys']) ? "0" : "1";
$subject = "RE: ".$tdata['thread_subject'];
$result = dbquery("UPDATE ".$db_prefix."forums SET forum_lastpost='".time()."', forum_lastuser='".$userdata['user_id']."' WHERE forum_id='$forum_id'");
$result = dbquery("UPDATE ".$db_prefix."threads SET thread_lastpost='".time()."', thread_lastuser='".$userdata['user_id']."' WHERE thread_id='$thread_id'");
$result = dbquery("INSERT INTO ".$db_prefix."posts (forum_id, thread_id, post_subject, post_message, post_showsig, post_smileys, post_author, post_datestamp, post_ip, post_edituser, post_edittime) VALUES ('$forum_id', '$thread_id', '$subject', '$message', '$sig', '$smileys', '".$userdata['user_id']."', '".time()."', '".USER_IP."', '0', '0')");
$newpost_id = mysql_insert_id();
$result = dbquery("UPDATE ".$db_prefix."users SET user_posts=user_posts+1 WHERE user_id='".$userdata['user_id']."'");
redirect("postify.php?post=reply&error=0&forum_id=$forum_id&thread_id=$thread_id&post_id=$newpost_id");
}
}
}
opentable($locale['500']);
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='smallalt'><a href='index.php'>".$settings['sitename']."</a> | $caption</td>\n";
if (iMEMBER) {
echo "<td align='right'>\n";
if (!$tdata['thread_locked'] && $can_reply) {
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=$thread_id'><img src='".THEME."forum/reply.gif' alt='".$locale['565']."' style='border:0px;'></a>\n";
}
if ($can_post)
{
echo "<a href='post.php?action=newthread&forum_id=$forum_id'><img src='".THEME."forum/newthread.gif' alt='".$locale['566']."' style='border:0px;'></a></td>\n";
}
}
echo "</tr>
</table>\n";
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
echo "<br /><table cellpadding='0' cellspacing='0' class='tbl-border' align='right'>
<tr>
<td class='tbl1'><b><a href='printthread.php?forum_id=$forum_id&thread_id=$thread_id&rowstart=$rowstart'>".$locale['fb_j100']."</a></b></td>
<td class='tbl1'><b><a href='#rate'>".$locale['fb_j101']."</a></b></td>
<td class='tbl1'><b>".($style == "1" || !$style ? "<a href='".FUSION_SELF."?forum_id=".$forum_id."&thread_id=".$thread_id."&style=2'>".$locale['fb_j102']."</a>" : "<a href='".FUSION_SELF."?forum_id=".$forum_id."&thread_id=".$thread_id."&style=1'>".$locale['fb_j103']."</a>")."</b></td>
</tr>
</table><br /><br />";
$rows = dbcount("(thread_id)", "posts", "thread_id='$thread_id'");
if (isset($pid) && isNum($pid)) {
$reply_count = dbcount("(post_id)", "posts", "thread_id='".$tdata['thread_id']."' AND post_id<='".$pid."'");
if ($reply_count > $posts_per_page) $rowstart = ((ceil($reply_count / $posts_per_page)-1)*$posts_per_page);
}
if ($rows > $posts_per_page) {
echo "<div align='center' style='margin-top:5px;margin-bottom:5px;'>
".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&")."
</div>\n";
}
if($style == "1"){
/* begin fusion style */
echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
if ($rows != 0) {
$result = dbquery(
"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name FROM ".$db_prefix."posts p
LEFT JOIN ".$db_prefix."forum_attachments fa USING(post_id)
LEFT JOIN ".$db_prefix."users u ON p.post_author = u.user_id
LEFT JOIN ".$db_prefix."users u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
WHERE p.thread_id='$thread_id' ORDER BY post_datestamp LIMIT $rowstart,$posts_per_page"
);
$numrows = dbrows($result);
while ($data = dbarray($result)) {
$message = $data['post_message'];
if ($data['post_showsig']) { $message = $message."\n\n<hr>".$data['user_sig']; }
if ($data['post_smileys']) { $message = parsesmileys($message); }
$message = parseubb($message);
$message = parseubb_extra($message);
$message = nl2br($message);
if ($data['post_edittime'] != "0") {
$edituser = "<a href='../profile.php?lookup=".$data['post_edituser']."'>".$data['edit_name']."</a>";
$edittime = showdate("forumdate", $data['post_edittime']);
}
$is_mod = in_array($data['user_id'], $forum_mods) && $data['user_level'] < "102" ? true : false;
echo "<tr>
<td width='145' class='tbl2'>".$locale['501']."</td>
<td class='tbl2'><a name='post_".$data['post_id']."' id='post_".$data['post_id']."'></a>".$data['post_subject']."</td>
</tr>
<tr>
<td valign='top' rowspan='3' width='145' class='tbl1'>
<b><a href='../profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a></b>
<br /><br />";
show_level();
echo "<br><br>\n";
if ($data['user_avatar'] != "") {
echo "<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$locale['567']."'><br><br>\n";
$height = "210";
} else {
echo "<img src='".FORUM."images/noav.gif' alt='".$locale['567']."'><br><br>\n";
$height = "210";
}
if($fboardControl['fbc_ranks'] == "1") echo show_medals($data['user_id']);
if($fboardControl['fbc_ranks'] == "1") echo getRank($data['user_id'])."<br />";
echo "<span class='alt'>".$locale['502']."</span> ".$data['user_posts']."<br>\n";
if ($data['user_location']) echo "<span class='alt'>".$locale['503']."</span> ".$data['user_location']."<br>\n";
echo "<span class='alt'>".$locale['504']."</span> ".showdate("%d.%m.%y", $data['user_joined'])."<br /><br />".show_warning()."</td>
<td>
<table cellspacing='0' cellpadding='0' width='100%'>
<tr>
<td class='tbl1'>".$locale['505'].showdate("forumdate", $data['post_datestamp'])."</td>
<td align='right' class='tbl1'>\n";
if (iMEMBER && $can_reply) {
if (!$tdata['thread_locked']) {
if (($userdata['user_id'] == $data['post_author'] && $can_edit) || iMOD || iSUPERADMIN) {
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' alt='".$locale['568']."' style='border:0px;'></a>\n";
}
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id'].""e=".$data['post_id']."'><img src='".THEME."forum/quote.gif' alt='".$locale['569']."' style='border:0px;'></a>\n";
if (iMOD || iSUPERADMIN && $data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) echo "<img src='".THEME."forum/ip.gif' alt='".$locale['570']."' title='".$data['post_ip']."' style='border:0px;'>\n";
} else {
if (iMOD || iSUPERADMIN) {
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' alt='".$locale['568']."' style='border:0px;'></a>\n";
if ($data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) echo "<img src='".THEME."forum/ip.gif' alt='".$locale['570']."' title='".$data['post_ip']."' style='border:0px;'>\n";
}
}
}
echo "</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign='top' height='$height' class='tbl1'>
$message";
if ($data['attach_id']) {
if (in_array($data['attach_ext'], $imagetypes) && @getimagesize(FORUM."attachments/".$data['attach_name'])) {
echo "<hr>\n".$data['user_name'].$locale['506']."<br><br>\n<img src='".FORUM."attachments/".$data['attach_name']."'>";
} else {
echo "<hr>\n".$data['user_name'].$locale['507']."<br>\n<a href='".FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&getfile=".$data['post_id']."'>".$data['attach_name']."</a>";
}
}
if ($data['post_edittime'] != "0") {
echo "<hr>\n".$locale['508'].$edituser.$locale['509']."$edittime";
}
echo "</td></tr>
<tr>
<td class='tbl1'>\n";
if ($data['user_aim'] && file_exists(THEME."forum/aim.gif")) {
echo "<a href='aim:goim?screenname=".str_replace(" ", "+", $data['user_aim'])."' target='_blank'><img src='".THEME."forum/aim.gif' alt='".$data['user_aim']."' style='border:0px;'></a> ";
}
if ($data['user_icq']) {
echo "<a href='http://web.icq.com/wwp?Uin=".$data['user_icq']."' target='_blank'><img src='".THEME."forum/icq.gif' alt='".$data['user_icq']."' style='border:0px;'></a> ";
}
if ($data['user_msn']) {
echo "<a href='mailto:$data[user_msn]'><img src='".THEME."forum/msn.gif' alt='".$data['user_msn']."' style='border:0px;'></a> ";
}
if ($data['user_yahoo']) {
echo "<a href='http://uk.profiles.yahoo.com/$data[user_yahoo]' target='_blank'><img src='".THEME."forum/yahoo.gif' alt='".$data['user_yahoo']."' style='border:0px;'></a> ";
}
if ($data['user_web']) {
if (!strstr($data['user_web'], "http://")) { $urlprefix = "http://"; } else { $urlprefix = ""; }
echo "<a href='".$urlprefix."".$data['user_web']."' target='_blank'><img src='".THEME."forum/web.gif' alt='".$data['user_web']."' style='border:0px;'></a> ";
}
echo "<a href='".BASEDIR."messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='".$locale['571']."' style='border:0px;'></a>
</td>
</tr>\n";
}
}
echo "</table>\n";
/* end fusion style */
} else {
/* begin vbulletin style */
echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
if ($rows != 0) {
$result = dbquery(
"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name FROM ".$db_prefix."posts p
LEFT JOIN ".$db_prefix."forum_attachments fa USING(post_id)
LEFT JOIN ".$db_prefix."users u ON p.post_author = u.user_id
LEFT JOIN ".$db_prefix."users u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
WHERE p.thread_id='$thread_id' ORDER BY post_datestamp LIMIT $rowstart,$posts_per_page"
);
$numrows = dbrows($result);
while ($data = dbarray($result)) {
$message = $data['post_message'];
if ($data['post_showsig']) { $message = $message."\n\n<hr>".$data['user_sig']; }
if ($data['post_smileys']) { $message = parsesmileys($message); }
$message = parseubb_extra($message);
$message = parseubb($message);
$message = nl2br($message);
if ($data['post_edittime'] != "0") {
$edituser = "<a href='../profile.php?lookup=".$data['post_edituser']."'>".$data['edit_name']."</a>";
$edittime = showdate("forumdate", $data['post_edittime']);
}
$is_mod = in_array($data['user_id'], $forum_mods) && $data['user_level'] < "102" ? true : false;
echo "<tr>
<td class='tbl2' colspan='2'><a name='post_".$data['post_id']."' id='post_".$data['post_id']."'></a>".$data['post_subject']." -
".$locale['505'].showdate("forumdate", $data['post_datestamp'])."</td>
</tr>
<tr>
<td colspan='2'>
<table cellspacing='0' cellpadding='0' width='100%' class='tbl-border'>
<tr>
<td width='100px' valign='middle' class='tbl1'>";
if ($data['user_avatar'] != "") {
echo "<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$locale['567']."'>\n";
} else {
echo "<img src='".FORUM."images/noav.gif' alt='".$locale['567']."'>\n";
}
echo "</td>
<td align='left' class='tbl1' valign='top'>
<span style='font-size: 24px;'><a href='../profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a></span><br />
" . ($fboardControl['fbc_ranks'] == "1" ? getRank($data['user_id']) : ""). "
".($fboardControl['fbc_medals'] == "1" ? $locale['fb_a100']."<br />
".show_medals($data['user_id']) : "")."
</td><td align='right' class='tbl1' valign='top'>";
show_level();
echo "<br><br>\n";
echo "<span class='alt'>".$locale['502']."</span> ".$data['user_posts']."<br>\n";
if ($data['user_location']) echo "<span class='alt'>".$locale['503']."</span> ".$data['user_location']."<br>\n";
echo "<span class='alt'>".$locale['504']."</span> ".showdate("%d.%m.%y", $data['user_joined'])."\n<br /><br />";
echo show_warning();
echo "</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign='top' class='tbl1' colspan='2'>
$message";
if ($data['attach_id']) {
if (in_array($data['attach_ext'], $imagetypes) && @getimagesize(FORUM."attachments/".$data['attach_name'])) {
echo "<hr>\n".$data['user_name'].$locale['506']."<br><br>\n<img src='".FORUM."attachments/".$data['attach_name']."'>";
} else {
echo "<hr>\n".$data['user_name'].$locale['507']."<br>\n<a href='".FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&getfile=".$data['post_id']."'>".$data['attach_name']."</a>";
}
}
if ($data['post_edittime'] != "0") {
echo "<hr>\n".$locale['508'].$edituser.$locale['509']."$edittime";
}
echo "</td></tr>
<tr>
<td class='tbl1'>\n";
if ($data['user_aim'] && file_exists(THEME."forum/aim.gif")) {
echo "<a href='aim:goim?screenname=".str_replace(" ", "+", $data['user_aim'])."' target='_blank'><img src='".THEME."forum/aim.gif' alt='".$data['user_aim']."' style='border:0px;'></a> ";
}
if ($data['user_icq']) {
echo "<a href='http://web.icq.com/wwp?Uin=".$data['user_icq']."' target='_blank'><img src='".THEME."forum/icq.gif' alt='".$data['user_icq']."' style='border:0px;'></a> ";
}
if ($data['user_msn']) {
echo "<a href='mailto:$data[user_msn]'><img src='".THEME."forum/msn.gif' alt='".$data['user_msn']."' style='border:0px;'></a> ";
}
if ($data['user_yahoo']) {
echo "<a href='http://uk.profiles.yahoo.com/$data[user_yahoo]' target='_blank'><img src='".THEME."forum/yahoo.gif' alt='".$data['user_yahoo']."' style='border:0px;'></a> ";
}
if ($data['user_web']) {
if (!strstr($data['user_web'], "http://")) { $urlprefix = "http://"; } else { $urlprefix = ""; }
echo "<a href='".$urlprefix."".$data['user_web']."' target='_blank'><img src='".THEME."forum/web.gif' alt='".$data['user_web']."' style='border:0px;'></a> ";
}
echo "<a href='".BASEDIR."messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='".$locale['571']."' style='border:0px;'></a>";
if (iMEMBER && $can_post) {
if (!$tdata['thread_locked']) {
echo "</td><td class='tbl1' align='right' width='165px'>";
if ($userdata['user_id'] == $data['post_author'] || iMOD || iSUPERADMIN) {
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' alt='".$locale['568']."' style='border:0px;'></a>\n";
}
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id'].""e=".$data['post_id']."'><img src='".THEME."forum/quote.gif' alt='".$locale['569']."' style='border:0px;'></a>\n";
if (iMOD || iSUPERADMIN && $data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) echo "<img src='".THEME."forum/ip.gif' alt='".$locale['570']."' title='".$data['post_ip']."' style='border:0px;'>\n";
} else {
if (iMOD || iSUPERADMIN) {
if($tdata['thread_locked']) echo "</td><td class='tbl1' align='right' width='165px'>";
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' alt='".$locale['568']."' style='border:0px;'></a>\n";
if ($data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) echo "<img src='".THEME."forum/ip.gif' alt='".$locale['570']."' title='".$data['post_ip']."' style='border:0px;'>\n";
}
}
}
echo "</td>
</tr>\n";
}
}
echo "</table>\n";
/* end fusion style */
}
if ($rows > $posts_per_page) {
echo "<div align='center' style='margin-top:5px;'>
".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&")."
</div>\n";
}
echo "<table cellpadding='0' cellspacing='0' width='100%' style='margin-top:5px;'>\n<tr>\n";
$forum_list = ""; $current_cat = "";
$result = dbquery(
"SELECT f.forum_id, f.forum_name, f2.forum_name AS forum_cat_name
FROM ".$db_prefix."forums f
INNER JOIN ".$db_prefix."forums f2 ON f.forum_cat=f2.forum_id
WHERE ".groupaccess('f.forum_access')." AND f.forum_cat!='0' ORDER BY f2.forum_order ASC, f.forum_order ASC"
);
while ($data = dbarray($result)) {
if ($data['forum_cat_name'] != $current_cat) {
if ($current_cat != "") $forum_list .= "</optgroup>\n";
$current_cat = $data['forum_cat_name'];
$forum_list .= "<optgroup label='".$data['forum_cat_name']."'>\n";
}
$sel = ($data['forum_id'] == $fdata['forum_id'] ? " selected" : "");
$forum_list .= "<option value='".$data['forum_id']."'$sel>".$data['forum_name']."</option>\n";
}
$forum_list .= "</optgroup>\n";
echo "<td align='left' class='tbl'>".$locale['540']."<br>
<select name='jump_id' class='textbox' onChange=\"jumpForum(this.options[this.selectedIndex].value);\">
$forum_list</select></td>\n";
if (iMEMBER && ($can_post || $can_reply)) {
if (iMOD || iSUPERADMIN) {
echo "<td align='right' class='tbl'>
<form name='modopts' method='post' action='options.php?forum_id=$forum_id&thread_id=$thread_id'>
".$locale['520']."<br>
<select name='step' class='textbox'>
<option value='none'> </option>
<option value='renew'>".$locale['527']."</option>
<option value='delete'>".$locale['521']."</option>\n";
if (!$tdata['thread_locked']) {
echo "<option value='lock'>".$locale['522']."</option>\n";
} else {
echo "<option value='unlock'>".$locale['523']."</option>\n";
}
if (!$tdata['thread_sticky']) {
echo "<option value='sticky'>".$locale['524']."</option>\n";
} else {
echo "<option value='nonsticky'>".$locale['525']."</option>\n";
}
echo "<option value='move'>".$locale['526']."</option>\n";
echo "</select>
<input type='submit' name='go' value='".$locale['528']."' class='button'>
</form>
</td>
</tr>\n";
}
}
echo "</table>\n";
if (iMEMBER) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
if ($settings['thread_notify']) {
echo "<td valign='top' class='tbl'>";
if (dbcount("(thread_id)", "thread_notify", "thread_id='$thread_id' AND notify_user='".$userdata['user_id']."'")) {
$result = dbquery("UPDATE ".$db_prefix."thread_notify SET notify_datestamp='".time()."', notify_status='1' WHERE thread_id='$thread_id' AND notify_user='".$userdata['user_id']."'");
$notify_link = "<a href='postify.php?post=off&forum_id=$forum_id&thread_id=$thread_id'>".$locale['515']."</a>";
} else {
$notify_link = "<a href='postify.php?post=on&forum_id=$forum_id&thread_id=$thread_id'>".$locale['516']."</a>";
}
echo "$notify_link</td>\n";
}
if ($can_post || $can_reply) {
echo "<td align='right' class='tbl'>";
if (!$tdata['thread_locked'] && $can_reply) {
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=$thread_id'><img src='".THEME."forum/reply.gif' alt='".$locale['565']."' style='border:0px;'></a>\n";
}
if ($can_post)
{
echo "<a href='post.php?action=newthread&forum_id=$forum_id'><img src='".THEME."forum/newthread.gif' alt='".$locale['566']."' style='border:0px;'></a>\n";
}
echo "</td>\n";
}
echo "</tr>\n</table>\n";
}
closetable();
echo "<a name='rate' id='rate'></a>";
showratings("F",$thread_id,FUSION_SELF."?".FUSION_QUERY);
if (iMEMBER && $can_reply && !$tdata['thread_locked']) {
echo "<br />";
opentable($locale['512']);
echo "<form name='inputform' method='post' action='".FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id'>
<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td align='center' class='tbl1'><textarea name='message' cols='80' rows='7' class='textbox'></textarea><br>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('message', '[b]', '[/b]');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('message', '[i]', '[/i]');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('message', '[u]', '[/u]');\">
<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('message', '[url]', '[/url]');\">
<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('message', '[mail]', '[/mail]');\">
<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('message', '[img]', '[/img]');\">
<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('message', '[center]', '[/center]');\">
<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('message', '[small]', '[/small]');\">
<input type='button' value='code' class='button' style='width:40px;' onClick=\"addText('message', '[code]', '
');\">
<input type='button' value='quote' class='button' style='width:45px;' onClick=\"addText('message', '', ' ');\">".extra_bb_codes()."</td>
</tr>
<tr>
<td align='center' class='tbl2'>".displaysmileys("message")."<br>
<input type='checkbox' name='disable_smileys' value='1'>".$locale['513']."</td>
</tr>
<tr>
<td align='center' class='tbl1'><input type='submit' name='postquickreply' value='".$locale['514']."' class='button'></td>
</tr>
</table>
</form>\n";
closetable();
}
echo "<script type='text/javascript'>
function jumpForum(forumid) {
document.location.href='".FORUM."viewforum.php?forum_id='+forumid;
}
</script>\n";
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?>
[/code]
Kod w CODE!!!/Pieka
Edytowane przez Pieka dnia 04.02.2007 12:00:52
|
|
|
|
turbin |
Dodany dnia 15.02.2007 17:55:48
|
Przedszkolak
Postów: 12
Data rejestracji: 04.09.2006 16:57
|
A ja w oparciu o twój skrypt zrobiłem taki co wyświetla jakiś obrazek na napisanymi postami.
Opis:
1. Otiweramy forum/viewtheread.php
2. Szukamy:
}
echo "<a href='".BASEDIR."messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='".$locale['571']."' style='border:0px;'></a>
</td>
</tr>\n";
}
}
echo "</table>\n";
if ($rows > $posts_per_page) {
3. Zamieniamy na:
}
echo "<a href='".BASEDIR."messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='".$locale['571']."' style='border:0px;'></a>
</td>
</tr>\n";
//Reklama
echo '<a href="[b]LINK[/b]" target="_blank"><img src="[b]ADRES OBRAZKA[/b]" border="0" alt="[b]OPIS OBRAZKA[/b]<"/></a>';
}
}
echo "</table>\n";
if ($rows > $posts_per_page) {
4. ZAMYKAMY I ZAPISUJEMY WSZYSTKIE PLIKI.
LINK - wpisujemy adres. Po to by po kliknięciu na obrazek przeniosło nas w wpisany link.
ADRES OBRAZKA - wpisujemy adres obrazka np. http://www.twoja_...brazek.gif
OPIS OBRAZKA - wpisujemy opsi obrazka. Pojawi sie ona po najechaniu na obrazek. Np. Wszystko o tutingu. :) |
|
|
|
swistak |
Dodany dnia 05.03.2007 22:33:52
|
Przedszkolak
Postów: 41 Ostrzeżeń: 3
v7.01.05 Data rejestracji: 23.12.2006 22:55
|
pytanie czy robił ktoś taką modyfikacje z reklamami google bo prubowałe i niechce mi działać chodzi oczywiscie o wscipskiego
"Tylko dwie rzeczy są nieskończone wszechświat i ludzka głupota, chociaż co do pierwszego nie mam pewności" Albert Einstein
|
|
|
|
Pieka |
Dodany dnia 05.03.2007 23:04:20
|
Postów: 19882 Pomógł: 767
v7.02.03 Data rejestracji: 23.02.2005 18:12
|
swistak napisał/a:
pytanie czy robił ktoś taką modyfikacje z reklamami google bo prubowałe i niechce mi działać chodzi oczywiscie o wscipskiego
Nie ma znaczenia rodzaj reklamy (AdSense, Adkontekst etc..), bo wszystkie opieraja sie na tym samym wzorcu.
Dziala na tym forum, to musi dzialac i u Was.
Edytowane przez Pieka dnia 05.03.2007 23:20:18
Jestem jaki jestem
|
|
|