vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Lookin for a hack - email into thread (https://vborg.vbsupport.ru/showthread.php?t=38465)

scatpack 05-09-2002 05:25 PM

Lookin for a hack - email into thread
 
Hello,

Ok heres the skinny:

I have an "experts" forum. Only my 9 "experts" are cleared to post in this forum. Up until now, questions for the experts have been emailed to me by users, and then I post the 'good questions' in this forum. Needless to say..this is a pain in the ass.

So what im thinking is this... I don't want to open the entire forum to the "general public" cause then they would be like a pack of wild monkeys postin away and general mayhem. And I don't like the way I have to post for them right now. Is there a better way?

How about a form that Emails the questions into the forum? Or is that to complicated? Any better ideas?

damicatz 05-09-2002 10:57 PM

You wouldn't e-mail the questions into the forum. All you need to do is write a script that adds the questions into the database.

Or make your forum moderated so that before new posts posted by regular users appear, they have to be approved by a mod or admin.

Logician 05-10-2002 10:33 AM

Maybe you should consider setting access permissions to:
1- Only your experts can reply other's threads while ordinary users can only reply their own.
2- Ordinary users' new threads are moderated.

This should do exactly what you want..

scatpack 05-17-2002 01:18 PM

Logician,

That sounds like a good idea. But Im not sure how to do it. I set that forum to moderated, but now even the "experts" replies are being moderated. Is there a way to set the general posts to moderated, but the expert posts aren't moderated and automatically get posted?

Logician 05-17-2002 01:55 PM

Here is the hack ;)

Edit newreply.php, find:
PHP Code:

if ($foruminfo['allowposting']==0) {
    eval(
"standarderror(\"".gettemplate("error_forumclosed")."\");");
  }

  
$visible=!$foruminfo[moderatenew]; 

AFTER that add:
PHP Code:

if ($bbuserinfo[usergroupid]==AND $foruminfo['forumid']==Y
{
  
$visible=1;


Replace X with expert's usergroupid and Y with forumid.. That's it..
Now experts can reply without moderation in that specific forum.

Enjoy!

Logician

scatpack 05-21-2002 01:20 PM

Um.... it didn't work. I get a "Parse error: parse error in /home2/www/mysite/forums/newreply.php on line 104"

I copied and pasted the code here. Line 104 is the "if ($bbuser" line. I get that parse error whenever someone tries to post, in any forum, including me. Not just forum 19.

PHP Code:

  $visible=!$foruminfo[moderatenew];
  
  if?(
$bbuserinfo[usergroupid]==11?AND?$foruminfo['forumid']==19)?

{

??
$visible=1;



I know your not "tech support" so I really appreciate the help!

Logician 05-21-2002 01:31 PM

is there a chance you are using OPERA as your browser?

The code you have written is correct and free of errors (especially parse errors), however there might be a problem with copy/paste process (Opera does this!). Please try to write it down verbatim, instead of copy/paste..

Also delete the spaces in the begining of the code, so it should be like this:

$visible=!$foruminfo[moderatenew];
if ($bbuserinfo[usergroupid]==11 AND $foruminfo['forumid']==19)
{
$visible=1;
}

after you finished..


All times are GMT. The time now is 12:32 AM.

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.01094 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete