PHP - Moved: Phpbb Geshi Syntax Highlighter
This topic has been moved to Third Party PHP Scripts.
http://www.phpfreaks.com/forums/index.php?topic=333143.0 Similar TutorialsI was able to install CKEditor and the plugin "Syntax Highlighter".
Yet the plugin does not work. This is how the code comes out:
<div> <H1>You are Writing this Post</H1> <form action="insert.php" method="POST"> <input type="text" name="title" /> <br /> <textarea type="text" name="post"></textarea> <br /> <input type="submit&qAny suggestions? Edited by glassfish, 03 October 2014 - 06:16 AM. This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=308860.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=355013.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=327615.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=313541.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=321480.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=352460.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=320409.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=342913.0 I am building a bbcode system to integrate the prism synthax highlighter into my custom php bulletin board; there are some issues with my regex synthax. This is what i need to achieve:
Allow users to post
text alone,
or code and text but never code alone.
Code may be preceded by text or text may be included after the code.
bbcode
// Function to convert BBcode in HTML tags function formatBBcode($str) { $str = preg_replace('/\[code](.+?)\[\/code]/si', '<section class="language-php"><pre><code>$1</code></pre></section>', $str); return $str; }validation code: $var = '[code]<!DOCTYPE html>[/code] Some text'; // post text alone or nothing at all if(!preg_match('~[[:alnum:]]~', trim(preg_replace('~\[code\].*?\[/code\]~', "", $var)))) { echo 'Please add some text...'; } else { // empty code tags if(preg_match('~\[code\]\s*\[/code\]~', $var)) { echo 'The code tags can not be empty!'; // If there are no issues } else { echo "Everything is ok!"; } }With the present code, this is my observation when code alone is posted: If the code is on a single line the 'Please add some text' warning is thrown up. e.g //This throws up warning 'please add some text' [code]some code[/code]However if the code is on multiple lines, then it gets posted without any warning. e.g //This does not throw up any warning but gets posted [code]some code [/code]I need help in resolving this. Thanks. Edited by terungwa, 23 May 2014 - 10:59 AM. Hi , i've spend some time looking how its possible to spider a phpbb forum with a php script. I'd like to -for example- do a search with the CURL functions , and read out some of the links in the searchresults(topics..). Finally save the links that i want into a mysql database. Somebody got an idea? might have it nevermind. Is there an updated version of the meeting Mod? It was a really amazing mod to have, can someone make something like this for 3.0.12?
Hello people. I have a phpbb forum, and I have added a facebook link to every topic within my forum. That was relatively simple. What I want to do now, is send information from the 'viewtopic.php' page -> an external page called share.php. The facebook buttons I have inserted go to 'share.php?postNo=621' (621 is an example)... in that case the post with the identity 621 is recalled.. however I need to prevent people from simply editing the URL to view/submit to facebook, posts which they are not entitled to view.. I have used this bit of code to hide display the facebook buttons.. if ($userdata['session_logged_in'] && $is_auth['auth_edit']) { //exectute button code... $temp_url = append_sid("../facebook/share.$phpEx?postNo=" . $postrow[$i]['post_id']); $sharefb_img = '<a href="' . $temp_url . '"><img src="templates/subSilver/images/lang_english/icon_fbshare.gif" alt="' . $lang['Share_with_facebook'] . '" title="' . $lang['Share_with_facebook'] . '" border="0" /></a>'; $quote = '<a href="' . $temp_url . '">' . $lang['Share_with_facebook'] . '</a>'; } That works fine. As you can see, the post number ($postrow[$i]['post_id']) is passed via URL to the next page.. However how do I prevent people from simply editing the 'postNo=' variable to view posts which they may not have permission to view. I hope you follow me!! Thank you in advance on anticipation of your help!! I've tried the PHPBB help forum and no one has answered. I thought i'd try here. For some reason i'm getting this weird error when I attempt to post. SQL ERROR [ mysqli ] Unknown column 'Tony' in 'where clause' [1054] SQL UPDATE phpbb_users SET user_gold = 50 WHERE username =Tony Tony is in the username row. What am I doing wrong? here's the code I'm using. Code: [Select] if (($mode == 'reply' || $mode == 'quote' || $mode == 'post')) { $sql = "UPDATE phpbb_users SET user_gold = 50 WHERE username =" . $user->data['username'] . ""; $db->sql_query($sql); } I installed phpbb to my site; however i didn't like it so i deleted it. Now my register.php (which hasn't been changed and worked before the phpbb install) will not post data to my database. If someone can help me fix this problem id be most thankful. This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=315281.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=344105.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=323310.0 I have been looking at this code most of the morning and do not have a clue what is wrong with the code. I am hoping its not a stupid mistake, can someone please help me out? thank you
<title>Inputing Travel Detials</title> <header> <h1 align="center"> Adding Travel Detials </h1> <body> <p> <center><img src="cyberwarfareimage1.png" alt="Squadron logo" style="width:200px;height:200px" style="middle"></center> <table border="1"> <tr> <td><a href="index.php"> Home Page </a></td> <td><a href="administratorhomepage.html">Administrator Home Page </a></td> <td><a href="viewhomepage.html">View Home Page </a></td> <td><a href="Inputhomepage.html">Input Home Page </a></td> <td><a href="traveldetials.html">Enter More Travel Detials </a></td> </table> </p> <?php include "connection.php"; $Applicant_ID = $_POST["Applicant_ID"]; $Method_Of_Travel = $_POST["Method_Of_Travel"]; $Cost = $_POST["Cost"]; $ETA = $_POST["ETA"]; $Main_Gate_Advised = $_POST["Main_Gate_Advised"]; $query = ("UPDATE `int_board_applicant` SET `Method_Of_Travel`=`$Method_Of_Travel', `Cost`=`$Cost', `ETA`='$ETA', `Main_Gate_Advised`='$Main_Gate_Advised' WHERE `Applicant_ID`='$Applicant_ID'"); $result = mysqli_query($dbhandle, $query) or die(mysqli_error($dbhandle)); if($result){ echo "Success!"; } else{ echo "Error."; } // successfully insert data into database, displays message "Successful". if($query){ echo "Successful"; } else { echo "Data not Submitted"; } //closing the connection mysqli_close($dbhandle) ?> |