on3advertising
Forum Replies Created
-
Forum: Plugins
In reply to: [bbPress Quotes] Plugin Does Not Work with WordPress 3.4.2Looking into it more, looks like he new WP isn’t using TinyMCE, or bbpress isn’t.
Forum: Plugins
In reply to: [bbPress Quotes] Plugin Does Not Work with WordPress 3.4.2I get the same error. I don’t even know where to start to fix this. I think it’s failing when trying to get the post or comment ID?
Forum: Hacks
In reply to: Add extra field to loginJust got the whole thing working, except I still get the sql error with varchars:
function restrictForum(){ $db_name = 'dbname'; $con = mysql_connect("url","username","password"); mysql_select_db("$db_name")or die("cannot select DB"); $cust_id = mysql_real_escape_string($_GET['cid']); $sql = "SELECT * FROM customer_data WHERE customer_number = $cust_id"; $result= mysql_query($sql); $cust_id_form = ('<form name="cust-form" id="cust-form" method="get"> <label for="cid">Enter Your Customer #</label><input name="cid" id="cid" type="text" maxlength="6" /> <input type="submit" value="Validate" />'); if ( isset( $_GET['cid'] ) && !empty( $_GET['cid'] ) && mysql_num_rows($result) == 1) { // cid (customer ID) is present, show the bbPress login form echo ('Please enter your username and password to continue.</br>'); echo do_shortcode('[bbp-login]'); } elseif ( $_GET['error'] == true ) { // cid entered was not valid echo 'The customer ID you entered is not valid.'; } elseif (!is_user_logged_in()){ echo $cust_id_form; } } add_shortcode('forum-login-restrict','restrictForum');
Forum: Hacks
In reply to: Add extra field to loginThat is really weird, I tried that before and it didn’t work. I think I had some code that was messing it up. It now works.
I almost have this whole thing working, but when I enter letters as a customer ID (which is invalid), I get a SQL error rather than an expected error:
function restrictForum(){ $db_name = 'dbname'; $con = mysql_connect("url","username","password"); mysql_select_db("$db_name")or die("cannot select DB"); $cust_id = mysql_real_escape_string($_GET['cid']); $sql = "SELECT * FROM customer_data WHERE customer_number = $cust_id"; $result= mysql_query($sql); if ( isset( $_GET['cid'] ) && !empty( $_GET['cid'] ) && mysql_num_rows($result) == 1) { // cid (customer ID) is present, show the bbPress login form echo ('Please enter your username and password to continue.</br>'); echo do_shortcode('[bbp-login]'); } elseif ( $_GET['error'] == true ) { // cid entered was not valid echo 'The customer ID you entered is not valid.'; } else { echo ('<form name="cust-form" id="cust-form" method="get"> <label for="cid">Enter Your Customer #</label><input name="cid" id="cid" type="text" maxlength="6" /> <input type="submit" value="Validate"'); // cid is absent so show the form to validate it // do your custom form here that asks for the customer ID. Then if the customer ID // is correct/valid reload this page like /login?cid=123456 which will show // the bbPress login form. } } add_shortcode('forum-login-restrict','restrictForum');
Forum: Hacks
In reply to: Add extra field to loginSo I got this far. I first connect to the database, validate the customer ID that is entered into the form, then do something with it. The problem is that I am getting a SQL error when entering letters into the form, saying “mysql_num_rows() expects parameter 1 to be resource, boolean”.
Also, I am embedding a shortcode into this function using the “do_shortcode(‘shortcode’)” function and it’s showing the name of the shortcode as text rather than actually populating the shortcode data.
function restrictForum(){ $db_name = 'dbname'; $con = mysql_connect("url","username","password"); mysql_select_db("$db_name")or die("cannot select DB"); $cust_id = mysql_real_escape_string($_GET['cid']); $sql = "SELECT * FROM customer_data WHERE customer_number = $cust_id"; $result= mysql_query($sql); if ( isset( $_GET['cid'] ) && !empty( $_GET['cid'] ) && mysql_num_rows($result) == 1) { // cid (customer ID) is present, show the bbPress login form echo do_shortcode('bbp-login'); } elseif ( $_GET['error'] == true ) { // cid entered was not valid echo 'The customer ID you entered is not valid.'; } else { echo ('<form name="cust-form" id="cust-form" method="get"> <label for="cid">Enter Your Customer #</label><input name="cid" id="cid" type="text" maxlength="6" /> <input type="submit" value="Validate"'); // cid is absent so show the form to validate it // do your custom form here that asks for the customer ID. Then if the customer ID // is correct/valid reload this page like /login?cid=123456 which will show // the bbPress login form. } } add_shortcode('forum-login-restrict','restrictForum');
Forum: Plugins
In reply to: [Simple PopUp] How do you use it?I just deleted it. Was annoying off the bat, no documentation, and automatically added some “Edit me” pop up on every page of the sign immediately after activating it.
Yeah, and I think spam like this, that shows up on every screen and can’t be removed would usually reject this plugin as being approved on the WordPress plugin site. Thanks for removing it in the future.
Is this plugin not supported anymore? If not, it should have a note on the main page stating that so people aren’t waiting around for help on it.
More information than “errors showed” please, that doesn’t mean anything to anybody.
Forum: Fixing WordPress
In reply to: Changed single permalink but nested posts still contain old linkI guess I could physically write a SQL statement to run against my WP database but I’d rather not with all the risks involved.
Forum: Plugins
In reply to: [WP-Polls] [Plugin: WP-Polls] Vote button is goneI found out the problem. In the ‘Poll Options’ menu, I had to disable logging because it would cause the plugin to think I had already voted, although I was logged in as a different user. It would be nice to add a feature saying to log only by WordPress user and leave the IP address/cookie junk out of there.
Forum: Plugins
In reply to: [WP-Polls] [Plugin: WP-Polls] Changing Font Color on Vote Button?Your bbPress theme is overriding the button color. You need to open the plugin’s css file which is polls-css.css and on line 64 you’ll find the button class. From there, you need to add a color property like color:black !important;
You have to add the !important to override the theme’s default button color indefinitely. I don’t always recommend using !important but it’s kind of the lazy fix for this.
Forum: Plugins
In reply to: [WP-Polls] [Plugin: WP-Polls] how to change the font size of poll answersThe class is held in your polls-css.css file on line 25.
Forum: Plugins
In reply to: [WP-Polls] [Plugin: WP-Polls] cannot votegrantslab, I just went to your site and could vote just fine. My problem is I could only vote once then the vote button just disappeared. Not sure if you’re having the same problem.
I’m having the same issue with the hyperlinks. It also doesn’t show the actual topic comments: https://www.compusoftdevelopment.com/forum/?post_type%5B%5D=topic&post_type%5B%5D=reply&s=color+palette