Google+

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Avertizare WARN!
#1
Forumul meu http://www.wgm.ro !
Doresc si eu un plugin daca exista, ceva in genul vbulletin, cand dai cuiva warn sa apara in partea dreapta jos sau in oricare alta parte un cartonas rosu care arata acelora care au acces la warn, ca acel user a fost avertizat! Probabil ca m-ati inteles la ce ma refer! Ca asa se poate da warn la un user de 2-3 ori!

Multumesc frumos!
#2
Te intereseaza asa ceva?
Daca nu spune-mi cam ce ar vrea sa faca ca nu prea se intelege din postul tau...
Users : collective term for those who use computers. Users are divided into three types : novice, intermediate and expert.
Novice users : people who are afraid that simply pressing a key might break their computer.
Intermediate users : people who don`t know how to fix their computer after they`ve just pressed a key that broke it.
Expert users : people who break other people`s computers.
#3
nu este ceea ce cautam!
Atunci cand dai cuiva warn, sa apara unde a postat el un cartonas rosu sau o alta imagine pe care o pun pentru warn, cum e la vbulletin(cand dai warn cuiva apare unde a postat in postbit sau in dreapta jos langa Edit, un cartonas rosu, pentru a se evita ca ceilalti moderatori sa nu ii mai dea warn inca odata respectivului).
Mai pe scurt o atentionare ca acel user a fost avertizat odata!
Daca gasesc o poza poate reusesc sa postez!
#4
Cred ca am inteles... Deci imaginea sa apara in postul respectiv, undeva jos...
Da , nu exista inca asa ceva pentru MyBB... O sa incerc sa il fac...
Users : collective term for those who use computers. Users are divided into three types : novice, intermediate and expert.
Novice users : people who are afraid that simply pressing a key might break their computer.
Intermediate users : people who don`t know how to fix their computer after they`ve just pressed a key that broke it.
Expert users : people who break other people`s computers.
#5
ok, mersi frumos, pe foarte multi iar ajuta!
#6
Auzi poti sa-mi spui care este modul vbulletin care face asa ceva? Sa ma uit eu mai exact cum ar trebui sa fie?
Users : collective term for those who use computers. Users are divided into three types : novice, intermediate and expert.
Novice users : people who are afraid that simply pressing a key might break their computer.
Intermediate users : people who don`t know how to fix their computer after they`ve just pressed a key that broke it.
Expert users : people who break other people`s computers.
#7
orice versiune!
#8
(03-19-2011, 12:11 PM)Mihu Wrote: Auzi poti sa-mi spui care este modul vbulletin care face asa ceva? Sa ma uit eu mai exact cum ar trebui sa fie?

Este implicit in Vbulletin si mybb-ul are, doar ca nu e vizibil pentru toata lumea, doar pentru cel ce primeste warningul. Astfel tot ceea ce ar trebui sa faci, este sa faci un costum user file care sa adauge la User preference inca o linie cu warning level pe care-l are userul respecitv. Sau si mai simplu, te pui si editezi in mybb warningul, astfel incat sa fie vizibil pentru toata lumea, nu numai pentru userul care il primeste.
Keep walking !   http://www.mybb.ro
#9
(03-19-2011, 01:43 PM)Radu Wrote:
(03-19-2011, 12:11 PM)Mihu Wrote: Auzi poti sa-mi spui care este modul vbulletin care face asa ceva? Sa ma uit eu mai exact cum ar trebui sa fie?

Este implicit in Vbulletin si mybb-ul are, doar ca nu e vizibil pentru toata lumea, doar pentru cel ce primeste warningul. Astfel tot ceea ce ar trebui sa faci, este sa faci un costum user file care sa adauge la User preference inca o linie cu warning level pe care-l are userul respecitv. Sau si mai simplu, te pui si editezi in mybb warningul, astfel incat sa fie vizibil pentru toata lumea, nu numai pentru userul care il primeste.
Pff nici nu stiam... Sa ma uit... O sa editez in mybb warning sa il poate vedea toti...
Users : collective term for those who use computers. Users are divided into three types : novice, intermediate and expert.
Novice users : people who are afraid that simply pressing a key might break their computer.
Intermediate users : people who don`t know how to fix their computer after they`ve just pressed a key that broke it.
Expert users : people who break other people`s computers.
#10
Work done!
Salveaza tot continutul de mai jos intr-in fisier pwc.php si pune-l in inc/plugins/ . Apoi activeaza-l din Admin CP.

PHP 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
<?php
// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
	die("Direct initialization of this file is not allowed.");
}
// Plugin hook
$plugins->add_hook("postbit", "pwc_postbit");
// Plugin info
function pwc_info()
{
	return array(
		"name"			=> "Post Warned Card",
		"description"	=> "A card shown on the Post where Post Author got warning.",
		"website"		=> "http://www.mybbromania.net",
		"author"		=> "Surdeanu Mihai",
		"authorsite"	=> "http://www.mybbromania.net",
		"version"		=> "1.0",
		"compatibility" => "1*"
	);

}
// Activate plugin
function pwc_activate()
{
	global $db, $mybb;

	$pwc_group = array(
		"gid"			=> "NULL",
		"name"			=> "pwc_run",
		"title" 		=> "Post Warned Card",
		"description"	=> "Here you can manage P.W.C. extensively.",
		"disporder"		=> "1",
		"isdefault"		=> "no",
	);
	$db->insert_query("settinggroups", $pwc_group);
	$gid = $db->insert_id();
	
	$pwc_setting_1 = array(
		"sid"			=> "NULL",
		"name"			=> "pwc_enable",
		"title"			=> "Enable/Disable",
		"description"	=> "Would you like to Enable Or Disable P.W.C. ?",
		"optionscode"	=> "yesno",
		"value"			=> "yes",
		"disporder"		=> "1",
		"gid"			=> intval($gid),
	);

	$db->insert_query("settings", $pwc_setting_1);

	$pwc_setting_2 = array(
		"sid"			=> "NULL",
		"name"			=> "pwc_author",
		"title"			=> "Thread Author Visibility",
		"description"	=> "Do you really want to show the messahe to the thread author ?",
		"optionscode"	=> "yesno",
		"value"			=> "no",
		"disporder"		=> "2",
		"gid"			=> intval($gid),
	);
	
	$db->insert_query("settings", $pwc_setting_2);
	
	// Rebuilding settings
    rebuild_settings();
}

// Deactivate plugin
function pwc_deactivate()
{
	global $db, $mybb;

	$db->query("DELETE FROM ".TABLE_PREFIX."settinggroups WHERE name='pwc_run'");
	$db->query("DELETE FROM ".TABLE_PREFIX."settings WHERE name='pwc_enable'");
	$db->query("DELETE FROM ".TABLE_PREFIX."settings WHERE name='pwc_author'");
	
	// Rebuilding settings
    rebuild_settings();
}

// Run plugin
function pwc_postbit($post)
{
	global $db, $mybb, $groupscache, $usergroup, $thread, $message;
	$enable = $mybb->settings['pwc_enable'];
	$author = $mybb->settings['pwc_author'];

	if ($enable != "0")
	{
		$get_wp = $db->simple_select("warnings", "*", "pid='{$post['pid']}'");
		$yes = $db->fetch_field($get_wp, "pid");

		if ($yes && $author != "0" && $post['uid'] == $mybb->user['uid'])
		{
		$post['message'].="<div style=\"vertical-align: bottom;\">
	                             <div style=\"float: right;\"><img src=\"
http://www.widzewlive.pl/dom/gfx/ico/yellow_card.png\"/></div>
                                   </div>";
		}
		elseif ($yes && $mybb->user['usergroup'] == "4")
		{
		$post['message'].="<div style=\"vertical-align: bottom;\">
	                             <div style=\"float: right;\"><img src=\"
http://www.widzewlive.pl/dom/gfx/ico/yellow_card.png\"/></div>
                                   </div>";
		}
	}
}
?>

Modifica adresa imaginii afisate prin intermediul parametrului src al tagului img :

Code:
<img src=\"http://www.widzewlive.pl/dom/gfx/ico/yellow_card.png\"/>


Screenshot :
   

Users : collective term for those who use computers. Users are divided into three types : novice, intermediate and expert.
Novice users : people who are afraid that simply pressing a key might break their computer.
Intermediate users : people who don`t know how to fix their computer after they`ve just pressed a key that broke it.
Expert users : people who break other people`s computers.


Forum Jump:


Users browsing this thread: 1 Guest(s)