View Full Version : aproved... not aproved hack!
i was wondering if someone could make a hack.... there would be 2 buttons in the post
the frist button would be the aproved button. if the post is aproved by a mod you click that button and it edits the post and puts
"this post has been aproved by $username at $date $time"
then you got not aproved button wich would do
"this post has been NOT been aproved by $username at $date $time"
and it would close the post
this would be very usefull and i dont think to hard...
if someone could please make this i would be very thankfull and impressed
Thanks
Xenon
07-18-2002, 09:04 PM
yes it can be done very easy it think.
you have to edit functions.php the getpostbit-section
edit the postbittemplate
and add a small section to for example editpost.php to link at ;)
but i don't think it's usefull, because post is edited, so everyone can change it ;)
or do you talk about threads?
yes it's also possible then, but i don't think it's too usefull, because moderation of threads has nearly the same effect
couldnt this be done the same way as the reason to close hack? but just make a seprate button that would put the aproved and not close the thread
Xenon
07-19-2002, 10:21 PM
yes, it wouldn't be hard to make such a hack
just add a field to the thread-table
add one small block to posting.php
also a small ifclause to showthread.php
and a change of showthread template.
and of course 2 buttons to draw ;)
can ya do the code and ill do the buttons?
Xenon
07-20-2002, 12:30 PM
ok, have done the code, but it's not perfect nor tested use it on your own risk ;)
can you add the date and time and user it was aproved or not aproved by?
this is the error im getting
Parse error: parse error in /home/sim/public_html/tap/board/postings.php on line 8
line 8 would be
$DB_site->query("UPDATE thread SET aproving='this thread has been NOT aproved by ".$bbuserinfo[username]." at ".vbdate($dateformat,time())."' WHERE threadid=".$threadid);
ah never mind igot it... one more question... is there any way i can templateize what it says when i click aproved or not aproved?
?
liek givei t some tables or something?
eh sorry 1 more thing.. when you apove a thread it doesnt show the butons again soo i cant not aprove or aprove it agian.
also for the aprove button can you make it open the thread if it has already been closed?
Xenon
07-21-2002, 03:42 PM
oh boy not so much at one time ;)
1. time and username are included as i know ;)
2. templatization: (<- nice word ^^)
add eval("\$thread[aproving] = \"".gettemplate("aproving")."\";");
in showthread.php after if(trim($thread[aproving])=="" && ismoderator($thread['forumid'])) {
eval("\$apbuttons = \"".gettemplate("apbuttons")."\";");
} else {
then create a template aproving and put $thread[aproving] in it ;)
3. "when you apove a thread it doesnt show the butons again soo i cant not aprove or aprove it agian."
yes this was planed ;)
if you don't want this just remove the trim($thread[aproving])=="" && from the if clause
if i remove
if you don't want this just remove the trim($thread[aproving])=="" && from the if clause
i get a parse error
ok i got the above to work... but i was wondering if there was a way to get the time in the statment.. couse it only shows user name and date
btw for the templtate thing... i was talking about this
this thread has been NOT aproved by ".$bbuserinfo[username]." at ".vbdate($dateformat,time()
can that be templateized?
ya.... i just tried what you told me in a few posts back and it didnt work for the tempplate
here is the template code i used
<td bgcolor="{tableheadbgcolor}" width="175" nowrap><smallfont color="{tableheadtextcolor}"><b><img src="{imagesfolder}/off.gif" alt="Aproved Status"> Status: </b></smallfont></td>
<td bgcolor="{tableheadbgcolor}" width="100%">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<td width="100%"><smallfont olor="{tableheadtextcolor}"><b>$thread[aproving]</b></smallfont></table>
Xenon
07-22-2002, 03:49 PM
hmm, you can alter $dateformat to whatever you want, so you can add time yourself....
hmm, normaly you should be able to templateisize te aproving term:
add eval("\$apnoterm = \"".gettemplate("apnoterm")."\";");
just before
$DB_site->query("UPDATE thread SET aproving='this thread has been NOT aproved by ".$bbuserinfo[username]." at ".vbdate($dateformat,time())."' WHERE threadid=".$threadid);
and change the query to this:
$DB_site->query("UPDATE thread SET aproving='".$apnoterm."' WHERE threadid=".$threadid);
it should work then
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.