Jump to content

Search the Community

Showing results for tags 'forum'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 15 results

  1. Hey guys, I just started a web developer forum and was wondering if anybody would be interested in being an admin or mod. I could really use the help getting it started. So if you could please just contact me on phpfreaks or go ahead and make an account on my forum and send me and PM and I can give further details. Thanks! The url: http://coding4um.com
  2. So I have been slowly working on a custom forum. I have recently been trying to implement an achievement system. For the most part achievements would work based on the users amount of posts amount of characters in a post amount of replies on a post time past from the users join date. I was hoping to find out how I could put an entry into a database field based on the above. Any help would be greatly appreciated
  3. <?php $site_email = $row["example@madhost.co"]; $email25=$_REQUEST['email']; $action=$_REQUEST['action']; if ($action=="") /* display the contact form */ { ?> <form id="ContactForm" action="" method="POST" enctype="multipart/form-data"> <input type="hidden" name="action" value="submit"> <div> <div class="wrapper"> <span>Your Name:</span> <input type="text" class="input" name="name" maxlenght="15"> </div> <div class="wrapper"> <span>Your E-mail:</span> <input type="text" class="input" name="email" > </div> <div class="textarea_box"> <span>Your Message:</span> <textarea name="textarea" cols="1" rows="1"></textarea> </div> <input type="submit" class="button1"> <a href="contact.php" class="button1">Clear</a> </div> </form> <?php } else /* send the submitted data */ { $name=$_REQUEST['name']; $email=$_REQUEST['email']; $message=$_REQUEST['textarea']; if (($name=="")||($email=="")||($message=="")) { echo "All fields are required, please fill <a href=\"\">the form</a> again."; } else{ $from="From: $name<$email>\r\nReturn-path: $email"; $subject= $subject1; mail($to =$site_email, $message, $from); echo " <div class=\"contactform\"> Thank you for contacting us, please wait for our reply! </div> "; } } ?> The only problem is that im not recieving the email :/ Any Help ? I would really appreciate it and thank you
  4. Hallo everybody! I am looking for some information about creating PHP threaded forum (with MySQL). BB forum is easy - db table with forums, topics and posts, every post has foreign key to topic, topic to forum and it's done. But if I want something like Disqus, how to do this more efficiently? How to collect posts in db with minimum query needed to render any thread? And what about post rating? How to prevent user from sending more then one rating?
  5. Could any one take a look at my php forum script? The links are set correctly I can get to my confimation site but i dont recieve the email after submiting it I would greatly appreciate anyone givng me pointers <?php /* This first bit sets the email address that you want the form to be submitted to. You will need to change this value to a valid email address that you can access. */ $webmaster_email = "___________@gmail.com"; /* This bit sets the URLs of the supporting pages. If you change the names of any of the pages, you will need to change the values here. */ $feedback_page = "feedback_form.html"; $error_page = "error_message.html"; $thankyou_page = "thank_you.html"; /* This next bit loads the form field data into variables. If you add a form field, you will need to add it here. */ $email_address = $_POST['email_address'] ; $full_name = $_POST['full_name'] ; $phone_number = $_POST['phone_number'] ; $comments = $_POST['comments'] ; $fudge_brownie = $_POST['fudge_brownie'] ; $italian_biscotti = $_POST['italian_biscotti'] ; $chocolatechip_cookies = $_POST['chocolatechip_cookies'] ; $oatmeal_cookie = $_POST['oatmeal_cookie'] ; $french_bread = $_POST['french_bread'] ; $kaiser_delirolls = $_POST['kaiser_delirolls'] ; $hamburger_rolls = $_POST['hamburger_rolls'] ; $sub_rolls = $_POST['sub_rolls'] ; $slider_rolls = $_POST['slider_rolls'] ; $snickerdoodle_cookies = $_POST['snickerdoodle_cookies'] ; $sticky_buns = $_POST['sticky_buns'] ; $woopie_pie = $_POST['woopie_pie'] ; $coconut_macaroons = $_POST['coconut_macaroons'] ; $special_comments = $_POST['special_comments'] ; /* The following function checks for email injection. Specifically, it checks for carriage returns - typically used by spammers to inject a CC list. */ function isInjected($str) { $injections = array('(\n+)', '(\r+)', '(\t+)', '(%0A+)', '(%0D+)', '(%08+)', '(%09+)' ); $inject = join('|', $injections); $inject = "/$inject/i"; if(preg_match($inject,$str)) { return true; } else { return false; } } // If the user tries to access this script directly, redirect them to the feedback form, if (!isset($_POST['email_address'])) { header( "Location: $feedback_page" ); } // If the form fields are empty, redirect to the error page. elseif (empty($email_address) || empty($comments)) { header( "Location: $error_page" ); } // If email injection is detected, redirect to the error page. elseif ( isInjected($email_address) ) { header( "Location: $error_page" ); } // If we passed all previous tests, send the email then redirect to the thank you page. else { mail( "$webmaster_email", "DessertsOnDemandOrder", $special_comments, $coconut_macaroons, $woopie_pie, $sticky_buns, $snickerdoodle_cookies, $slider_rolls, $sub_rolls, $hamburger_rolls, $kaiser_delirolls, $french_bread, $oatmeal_cookie, $chocolatechip_cookies, $italian_biscotti, $fudge_brownie, $comments, $phone_number, $full_name, "From: $email_address" ); header( "Location: $thankyou_page" ); } ?>
  6. Hello All: I am not very familiar with php, and need some advice about how to do something. Really appreciate a little advice. I am making a forum with MODX, it has a module for forums called Discuss. Discuss has a built-in functionality to organize new topics into questions or discussions, regardless of the board a topic is in. So when you try to make a new topic it has got two buttons, question or discussion, and if you don't choose one it throws an error (its suppose to warn you but doesn't now). I want to remove this function completely, not because of the error but just because its not suitable for my site which is not a support site. I don't care if the system considers all posts as questions, or as discussions, I just want the users to not have to choose and they can just post their topics, no buttons, no choice, and no error. Removing the buttons is easy enough, but I need to change a little php to tell the system to either not need this info, or just give it a default variable so that the user can post (I don't know the variable names right now but that is next I guess). Anyway, here is the code which will probably be clearer than the above: $discuss =& $modx->discuss; $modx->lexicon->load('discuss:post'); $fields = $hook->getValues(); unset($fields[$submitVar]); if (empty($fields['board'])) return $modx->error->failure($modx->lexicon('discuss.post_err_ns')); $board = $modx->getObject('disBoard',$fields['board']); if ($board == null) return false; My first thought was to change the "If empty" line, and tell it, if empty then return (one of the two possible values). Then, everything would be ok, it seems to me. But could I also just strip out the check for the variable completely? If I took out the three lines starting with $fields all the way to the "If empty" line, wouldn't that mean the check is gone and the post will post without concern that this value doesn't exist? Or would this set off the system somehow (as it presumably never contemplated that this value would not be there)? Or, am I barking up the wrong tree here? Really looking forward to some advice about this. Thanks in advance!
  7. How do companies such as vBulletin and WoltLab manage licenses given to users for the software they've bought? In other words, how do they know you've actually bought a license for the software and distinguish between "nulled" and "legit" software (that is, forums)? Obviously they do it somehow, otherwise the business model of distributing PHP-based forum software wouldn't bring in any revenue. Does it have to do with PHP, and can you implement a certain check within the software that communicates back to the licenser?
  8. Given an input of an expression consisting of a string of letters and operators (plus sign, minus sign, and letters. IE: ‘b-d+e-f’) and a file with a set of variable/value pairs separated by commas (i.e: a=1,b=7,c=3,d=14) write a program that would output the result of the inputted expression. For example, if the expression input was ("a + b+c -d") and the file input was ( a=1,b=7,c=3,d=14) the output would be -3. Thus far I have got this, it calculates the numbers but not sure how to calculate it by the letters abcd, <html> <head> </head> <body> <form action = "" method = "GET"> Number 1: <input type = "first" name = "input[]" size=3> <br/> Number 2: <input type = "second" name = "input[]" size=3> <br> Number 3: <input type = "third" name = "input[]" size=3> <br> Number 4: <input type = "fourth" name = "input[]" size=3> <br> <input type="hidden" name="calc" value ="yes"> <input type = "submit" name = "Calculate"/> </form> </body> </html> <?php print_r($_GET); $myInputs = $_GET['input']; // assigning $_GET value print_r($myInputs); echo $myInputs[0]+ $myInputs[1]; $myArray = array(); $myArray['a'] = 5; $myArray['b'] = 10 ; $myArray['c'] = 15 ; $myArray['d'] = 20 ; // using a,b,c,d only... using $_GET here echo $myArray['a']+$myArray['b']; // get directly from$_GET values. echo $_GET['input'][0]+ $_GET['input'][1]; ?>
  9. i have want to include external geturls.php located in other domain, on select option of omain in same forum single sub,it button how to switch include include('domain1.com/geturl.php')include('domain2.com/geturl.php').... <body> <? include('geturl.php'); ?> <script type="text/javascript"> function ismaxlength(obj){ var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : "" if (obj.getAttribute && obj.value.length>mlength) obj.value=obj.value.substring(0,mlength) } </script> <?PHP $id = md5(rand(6000,99999999999999991000)); ?> <td style="text-align: right;" colspan="21"> <font size="-1"><span style="font-family: Helvetica,Arial,sans-serif;"> <form method=post action="http://order.<?php echo $yourdomain?>/register2.php"> <table id="regtab"> <tr><th>Username<td><input type=text name=username size=30 value="" maxlength="16" onkeyup="return ismaxlength(this)" ><select size="1" name="website_category"> <option>domain</option> <option>domain1</option> <option>domain2</option> <option>domain3</option> <option>domain4</option> <option>domain5</option> <option>domain6</option> </select> <tr><th>Password<td><input type=password name=password size=30 maxlength="8" onkeyup="return ismaxlength(this)" > <tr><th>Email Address<td><input type=text name=email size=30 value="" > <tr><th> <td> <tr><th>Site Category<td> <select size="1" name="website_category"> <option>Personal</option> <option>Business</option> <option>Hobby</option> <option>Forum</option> <option>Adult</option> <option>Dating</option> <option>Software / Download</option> </select> </td> <tr><th><td> <tr><th>Site Language<td> <select size="1" name="website_language"> <option>English</option> <option>Non-English</option> </select> </td> <input type=hidden name=id value="<?PHP echo $id; ?>"> <tr><th>Security Code<td><img src="http://order.<?php echo $yourdomain?>/image.php?id=<?PHP echo $id; ?>" width="200" height="75"> <tr><th> <td> <tr><th>Enter Security Code<td><input type=text name=number size=30> <tr><th> <td> <tr><th colspan=2><input class="tempbut" type=submit value="Register" name="submit" align="left"> </table> </form> </body> </html> below is get url code <? $yourdomain = $_SERVER['HTTP_HOST']; $yourdomain = preg_replace('/^www\./' , '' , $yourdomain); $yourdomain = ucfirst($yourdomain); ?>
  10. Hey guys, i have already created a log-in / register system for my website, and i am currently trying to integrate a web forum from phpBB3. i have installed the forum correctly and it is up and running just fine. what i am having an issue with is merging the register systems of both and matching the queries of each databases username and password.and am somewhat lost in watching a tutorial. i have my login logic: <?include('include/init.php'); // DB CONNECTION AND SESSION START .. etc // Redirects user if already logged in logged_in_redirect(); if (empty($_POST) === false) { $username = $_POST['loginname']; $password = $_POST['loginpass']; if (empty($username) === true || empty($password) === true) { $errors[] = 'You need to enter a valid Username & Password'; } else if (user_exists($username) === false ) { $errors[] = ' We could not find this user info in our userbase.'; } else if (user_active($username) === false ) { $errors[] = 'This account still needs to be activated or is no longer active'; } else { $login = login($username, $password); if ($login === false) { $errors[] = ' The Username / Password combination you entered is incorrect.'; } else { $_SESSION['user_id'] = $login; header("Location: index.php"); exit(); } } }else { $errors[] = 'No Data Retrieved'; } if (empty($errors) === false) { ?> <div style=" width: auto; height: 300px; margin: auto; padding: none; text-align: center; position: relative; top: 300px;"> <h5> We tried our best to log you in, but.. <? echo output_errors($errors); }?> Click <a href="redirect.php">Here</a> to go back to the login. </h5> </div> and my sessions logic in the INIT.php: ob_start(); if(!isset($_SESSION)) { session_start(); } error_reporting(E_ALL| E_STRICT); ini_set('display_errors', 1); require_once ('core/database/dbconnect.php'); require_once ('core/functions/general.php'); require_once ('core/functions/users.php'); require_once 'core/queries/dbqueries.php'; require_once ('forums/phpBB3/includes/functions.php'); $current_file = explode('/', $_SERVER['SCRIPT_NAME']); $current_file = end($current_file); if (logged_in() === true) { $session_user_id = $_SESSION['user_id']; $user_data = user_data($session_user_id, 'user_id', 'username', 'password', 'email', 'gender', 'country', 'month' ,'date' , 'year', 'pass_recover', 'type'); if (user_active($user_data['username']) === false){ session_destroy(); header('Location: index.php'); exit(); } if($current_file !== 'change_password.php' && $current_file !== 'logout.php' && $user_data['pass_recover'] == 1 ){ header('Location: change_password.php?force'); exit(); } } $errors = array(); ?> now i have uploaded my phpbb3 file and set them into a directory called forums and in this directory come a bunch of predefined functions. so i wanted to start to add the conditionals to check to see if it was finding the other forums register info i added this: } else { $login = login($username, $password); if ($login === false) { $errors[] = ' The Username / Password combination you entered is incorrect.'; } else {$find = mysql_query("SELECT * FROM phpbb_users WHERE username = '$username' "); ----| if(mysql_num_rows($find)==0) { | echo "ERROR"; | } else { | while ($find_row = mysql_fetch_assoc($find)){ | // THIS WHOLE SNIPPET HAS BEEN ADDED $password_hash = $find_row['user_password']; | } | echo $password_hash; | } ----| $_SESSION['user_id'] = $login; header("Location: index.php"); exit(); } } i had to go into the main functions of the and comment out this line of code so my page would show /*if (!defined('IN_PHPBB')) { exit; } */ nothing seems to output when i add these conditionals, and i at this point i am just lost as to how to get this task done. i can still login with a user who registered using the site / but typing in the username of a user who has registered via forum is not outputting anything. any suggestion or ideas ? i really would appreciate any help on this
  11. Hi! Let's test my site. CryptBB - Open source encrypted forum: http://cryptbb.site40.net Opinions? cryptbb-
  12. Schweppers


    Hi, I'm trying to make a forum for my website and I keep getting this error when trying to create a new topic Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 10 I don't know what page this could be referring to. I have 2 pages to connect to two different DB's one being: config.inc.php the other being: connect.php I don't know what all more information you need to help with this, comment and I'll tell you more if needed.
  13. Hello I have been working on developing a custom forum software for personal use. I have everything done accept for the youtube integratio the align and link features in the post. As of right now Im more concerned with the youtube integration. I am currently using js to add the button and tags to the post and php to implement what the tags do. Currently the button is fine it posts the youtube tags which are [vid][/vid] I am just having trouble figuring out how to assing a variable so that a user can input the video id. I am trying to replace {PARAM} with the video id. here is what I have on the php file. ; $r = str_replace("[vid]","<object width='425' height='344'><param name='movie' value='http://www.youtube.com/v/{PARAM}'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/{PARAM}' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='425' height='344'></embed></object>",$r); $r = str_replace("[/vid]","",$r); $r = str_replace("{PARAM}", "KcuJAe3TrQw",$r); I have put a video id of KcuJAe3TrQw in quotes to see if the youtube will get put in if I just use the tags and it indeed does. What I want to do is replace the id with a variable that I can let the user asign the id to... How would I do this or something relevant that would work. Also if you have any spare time I would love to know what I am doing wrong with the align $r = str_replace(" [center]","align=center",$r); $r = str_replace("[/center] ","'>",$r); Thanx for looking at my post and I hope you can help me
  14. I got an error in my code and I'm not really sure of what it might be... this is the problem that I get I guess the problem is in the area that I will colour red in the code below. Since that is the 8th row of sql that is initiated I moved the green one to the end of the other row and the number switched from 8 to 7 so it is that code that is red that atm is what I see is the error so if someone could help me with this I would really appreciate it. <?php include '../../php/header2.php'; echo' <!--Mainbody--> <div align="center"class="box">'; echo '<h2>Create a topic</h2>'; if($_SESSION['signed_in'] == false) { echo 'Sorry, you have to be <a href="/forum/signin.php">signed in</a> to create a topic.'; } else { if($_SERVER['REQUEST_METHOD'] != 'POST') { $sql = "SELECT cat_id, cat_name, cat_description FROM categories"; $result = mysql_query($sql); if(!$result) { echo 'Error while selecting from database. Please try again later.'; } else { if(mysql_num_rows($result) == 0) { if($_SESSION['user_level'] == 1) { echo 'You have not created categories yet.'; } else { echo 'Before you can post a topic, you must wait for an admin to create some categories.'; } } else { echo '<form method="post" action=""> Subject: <input type="text" name="subcat_name" /><br /> Category:'; echo '<select name="subcat_cat">'; while($row = mysql_fetch_assoc($result)) { echo '<option value="' . $row['cat_id'] . '">' . $row['cat_name'] . '</option>'; } echo '</select><br />'; echo 'Message: <br /><textarea name="subcat_description" /></textarea><br /><br /> <input type="submit" value="Create subcategory" /> </form>'; } } } else { $query = "BEGIN WORK;"; $result = mysql_query($query); if(!$result) { echo 'An error occured while creating your topic. Please try again later.'; } else { $sql = "INSERT INTO subcategories (subcat_name, subcat_cat, subcat_description) VALUES('" . mysql_real_escape_string($_POST['subcat_name']) . "', NOW(), " . mysql_real_escape_string($_POST['subcat_cat']) . " " . mysql_real_escape_string($_POST['subcat_description']) . " )"; $result = mysql_query($sql); if(!$result) { echo 'An error occured while inserting your data. Please try again later.<br /><br />' . mysql_error(); $sql = "ROLLBACK;"; $result = mysql_query($sql); } else { $sql = "COMMIT;"; $result = mysql_query($sql); echo 'You have succesfully created <a href="subcategories.php?id='. $subcat_id . '">your new subcategorie</a>.'; } } } } ?> <?php echo '</div> <!--Bottom--> <div align="left"class="bottom"> </div>'; ?>
  15. What is the best practice for creating a private message system for... say a forum? I was thinking you just create a Message table, insert all messages into there and other info such as user id, when someone goes to view messages they can only view them based on their corresponding id. But maybe this one table approach isn't the way to go, just looking for suggestions or advice. -thanks!
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.