Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 06-07-2004, 07:21 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default moderate.php

just a quick question, i was just reading the script (as i need to make a moderation script) and i'm left wondering, whehter or not this could've been done so much simpler than it was done by jelsoft?
Reply With Quote
  #2  
Old 06-07-2004, 07:27 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I guess it depends what your moderating. Personally I don't find moderate.php overly complex.
Reply With Quote
  #3  
Old 06-07-2004, 07:41 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i just want to take some text in a database and display it, with the options to leave it in the queue, authorise it or delete, i guess my limited knowledge of php is causing problems here, i dunno i just read the script and it seemed to be doing so much more than it needed to

i expected to see;

an if //moderation is on
and a while // to show the data and give the options to moderate it

and that's it really.
Reply With Quote
  #4  
Old 06-07-2004, 07:48 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can probably get away with just adding a column to the table called visible and set it to either 1 (visible) or 0 (invisible/hidden) and add that to the where clause on the query.

eg to get all unmoderated items:

[sql]SELECT *
FROM tablename
WHERE visible = 0[/sql]
Reply With Quote
  #5  
Old 06-07-2004, 07:51 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that''s how i've got the database set up, it's just a matter of getting the page in the admincp to moderate the items, i guess i'll have to stop being lazy and actually learn how to make an admincp page, to think all i need is;

Code:
 text to moderate | option to approve | option to delete | option to do nothing
that has to be a pretty easy to do
Reply With Quote
  #6  
Old 07-03-2004, 08:52 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i hate the admin cp, it baffles me completely, everything is 20 times harder than coding for vB front end i just don't seem to be able to comprehend the coding, well i can kinda, i can read and understand what it's saying in the moderate.php but then it comes to applying that, it's practically impossible

[high]* sabret00the goes for a breather before heading back in for round 3[/high]
Reply With Quote
  #7  
Old 07-03-2004, 09:00 PM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just keep at it, the only way to learn is to get your hands dirty. That admin cp will look much harder to code for at first, because their is alot of extra code for html output.
Reply With Quote
  #8  
Old 07-04-2004, 12:44 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for that, i'll keep at it

i think my main problem is how i would've gone about it and how vb went about doing it is so different, so i'm trying to think like someone else would and it's causing problems but i'll persevere(sp:?)
Reply With Quote
  #9  
Old 07-04-2004, 12:51 PM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sabret00the
i hate the admin cp, it baffles me completely, everything is 20 times harder than coding for vB front end
That's weird becaues I find coding scripts for the Admin CP so much easier than the front-end. I love coding AdminCP scripts
Reply With Quote
  #10  
Old 07-04-2004, 02:09 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well i strapped on my php hat and dove right in, and it's not proving to be all that hard, bar one line that refuses to work

PHP Code:
print_label_row('<b> Posted: By </b>'iif($confession['userid'], "<a href=\"user.php?$session[sessionurl]do=viewuser&userid=$confession[userid]\" target=\"_blank\">$confession[username]</a>""Anonymous")); 
but i think it's cos the username is stored in teh user table and the left join on the confessions table i made for the array hates me, can i do it via a left join for the array or do i need to have that as a seperate query?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:57 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05523 seconds
  • Memory Usage 2,253KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete