|
OK, so I've got a wonky little problem. I'm building a ratings system, built around the p2 theme (it looks like a facebook status update). See if you can make sense of this- I added an extra column to the wp_posts table to store my rating because I wasn't sure where else to put it, and I wanted to make sure that a field for the rating was created. I'm playing around trying to be able to sort the posts based on the rating that is stored in the database. Based off of the codex and a few other google searches, here is what I came up with: code:
If I took out the ORDER BY and replaced it with AND rating='100', it would display the first X entries, where X is the number of posts with a rating of 100. Rating!='100' would give the first X entries, X is how many don't have a rating of 100. The behavior is similar if I do ID='1', etc. What did I (not) do?
|
# ? Jan 24, 2012 02:17 |
|
|
# ? May 13, 2024 22:55 |
|
Don't mess with the DB. Just use a custom meta field for rating.
|
# ? Jan 24, 2012 06:18 |
|
Ned posted:Don't mess with the DB. Just use a custom meta field for rating. How do I call add_post_meta() or any of the other WP calls in a POST statement? I can use get_post_meta() when I'm initially loading the page, but I need to be changing the rating on a javascript button click. I've tried this on the .php I call with $POST: code:
|
# ? Jan 24, 2012 15:25 |
|
Go here - http://codex.wordpress.org/Class_Reference/WP_Query Search for this: Custom Field Parameters you probably want to do update_post_meta to set it and just make sure you are getting the proper ID when you post. If you want to do things probably you should probably learn about the wonder that is admin-ajax.php
|
# ? Jan 25, 2012 09:04 |
|
Ned posted:Go here - http://codex.wordpress.org/Class_Reference/WP_Query I'm not sure if you're pointing me in the right direction, or if there's a miscommunication, but thanks for trying. I've got a javascript event tied to clicking either a thumbs up or a thumbs down button. On that click, I have a jQuery $.post call that gives my ratings.php a couple of values (post_ID, user_ID, vote). I use those values (after sanitizing) to make a prepared SQL query for a table called ratings. Further down ratings.php, I want to update the meta data of the post that was just rated. Simply calling update_user_meta(yadda yadda yadda); doesn't do anything, and I was assuming the $.post call is out of the scope of Wordpress so the WP functions can't be called. What I ended up doing was directly adding to the postmeta table through sanitized and prepared SQL statements. Is this a huge security gap? I know about SQL injections and such, I just don't know if there's a way to be protect against it if I'm writing my own SQL, and I'm not sure how to avoid doing that. Thanks!
|
# ? Jan 25, 2012 19:43 |
|
Best free plugin for forms?
|
# ? Jan 27, 2012 02:50 |
|
Abel Wingnut posted:Best free plugin for forms? I like contact form 7.
|
# ? Jan 27, 2012 04:15 |
|
cocteau posted:I like contact form 7. Yay! Support Miyoshi-san!
|
# ? Jan 27, 2012 04:30 |
|
Ned posted:Yay! Support Miyoshi-san! Explain?
|
# ? Jan 27, 2012 04:34 |
|
cocteau posted:Explain? Miyoshi-san is the creator of Contact form 7. We have a company here together in Japan.
|
# ? Jan 27, 2012 07:17 |
|
Ned posted:Miyoshi-san is the creator of Contact form 7. We have a company here together in Japan. Well, that's excellent then.... I've used the plugin a lot. Nice and simple, works every time.
|
# ? Jan 27, 2012 18:39 |
|
I've been hired to add a fancy javascript interactive map to an existing website. It's been straightforward so far until I needed to create some database generated pages using custom post types for an ajax portion of the map, in Headway. Without Headway, I would just create a template file and not include the header and footer of the Wordpress site, then hit the page with ajax to display the content. I've resorted to writing PHP code in a "leaf" textarea, along with CSS disabling parts of the template. It seems to be the only way. indulgenthipster fucked around with this message at 20:43 on Feb 1, 2012 |
# ? Feb 1, 2012 20:01 |
|
Gyshall posted:Try Disqus. Tried to tinker around with it. It has some nice features (which I'll need later on), but doesn't seem to have what my original request was.
|
# ? Feb 2, 2012 09:52 |
|
I'm looking for a free, two-column responsive minimalistic theme, preferably without images. Any ideas? e: found the perfect theme: http://leonpaternoster.com/wp-themes/ the kawaiiest fucked around with this message at 23:11 on Feb 7, 2012 |
# ? Feb 7, 2012 06:07 |
|
Anyone have a good method for migrating a WP site from one server to another? I tried using WordPress Move, which seemed to do everything I needed. I did a test run, where I had to change the domain name. Everything seems to of gone out, except if I go to any page but the home page I get a 404. This includes new pages I create. I first thought the issue was some data not switching over in the wp_options table, but after viewing it, it looks like everything is set up correctly. My gut is telling me that this issue wont happen when I do the actual transfer, since the domain name wont be changing.
|
# ? Feb 11, 2012 00:22 |
|
Did you set your permalinks?
|
# ? Feb 11, 2012 05:06 |
|
Ned posted:Did you set your permalinks? All that digging and I missed that. Thanks a ton!
|
# ? Feb 11, 2012 15:32 |
|
Does anyone happen to be familiar with the Pods CMS plugin? I'm trying to move my archaric and poorly coded inventory system over to it but I'm having issues on some key things. I have most of it working and can figure out the rest but I'm stuck right now. I'd be willing to throw some cash over for some help too.
|
# ? Feb 13, 2012 00:40 |
|
poxin posted:Does anyone happen to be familiar with the Pods CMS plugin? I'm trying to move my archaric and poorly coded inventory system over to it but I'm having issues on some key things. I have most of it working and can figure out the rest but I'm stuck right now. I'd be willing to throw some cash over for some help too. Use custom post types and taxonomies! Much better than Pods at this point in time.
|
# ? Feb 13, 2012 12:58 |
|
Edit: Never mind
poxin fucked around with this message at 02:01 on Feb 14, 2012 |
# ? Feb 14, 2012 01:23 |
|
Nevermind!
Mons Hubris fucked around with this message at 06:22 on Feb 15, 2012 |
# ? Feb 15, 2012 06:09 |
|
Speaking of custom post types... I've been working on something that called for a custom post type so I did some research and banged up a quick custom post type that has the provision for recording two custom fields of information against it. These fields are "author" and "author url". For some reason I can enter data in, save it and it sticks - I can see the data from those fields on the site, I can see the data in those fields when I edit the "post". But for some reason after a seemingly arbitrary period of time the fields are being reset to blank for some reason. Why on earth is this happening?
|
# ? Feb 15, 2012 08:44 |
|
Forgive me for sounding like an idiot here. It seems that every time I create a wordpress blog, it ends up being hacked and defaced by a bunch of palistinians within about 4 months. Any suggestions for hardening?
|
# ? Feb 17, 2012 19:05 |
|
Rime posted:Forgive me for sounding like an idiot here. First questions: Where are you hosting your sites? Do you use "admin" as your user name? Do you have a complex password?
|
# ? Feb 17, 2012 20:18 |
|
The last time it happened I was on a reseller hosting account with HostingZoom that I was running some affiliate test sites on as well. Complex passwords (Upper & Lowercase, symbols, numbers), not using "admin" as the login.
|
# ? Feb 17, 2012 20:27 |
|
I'm curious to know how you guys would go about this problem. I'm building a bilingual site (using qTranslate plugin to manage the French/English content). The problem I'm facing right now is that some pages have two distinct content zones which I'd like to be able to manage as well. At first I thought secondary-html-content would help me out but I figured I was kind of hosed since I need the secondary html content to be available in both French and English. I'm thinking of using the div-shortcode plugin and going from there. It seems like it might do the trick for me but might end up confusing for the client. Has anyone faced a situation like this before?
|
# ? Feb 17, 2012 23:13 |
|
Rime posted:The last time it happened I was on a reseller hosting account with HostingZoom that I was running some affiliate test sites on as well. Complex passwords (Upper & Lowercase, symbols, numbers), not using "admin" as the login. e: or this http://wordpress.org/extend/plugins/user-locker/ the kawaiiest fucked around with this message at 00:03 on Feb 18, 2012 |
# ? Feb 17, 2012 23:58 |
|
This is something I could write, but why reinvent the wheel, right? What I have in my mind may be too specific, and I may be better to do it by myself. But examples are welcome if people have used such plugins before. gwar3k1 fucked around with this message at 00:23 on Feb 18, 2012 |
# ? Feb 18, 2012 00:14 |
|
the kawaiiest posted:Were you keeping WP and all your plugins updated? Also, did you have this plugin or something similar? http://wordpress.org/extend/plugins/limit-login-attempts/ Nope, but I'm installing user locker now, that's fantastic thanks!
|
# ? Feb 18, 2012 00:44 |
|
Rime posted:Nope, but I'm installing user locker now, that's fantastic thanks!
|
# ? Feb 18, 2012 01:30 |
|
xenilk posted:I'm curious to know how you guys would go about this problem. Could you use child pages and then have a special template on the parent page in order to pull the child page content?
|
# ? Feb 18, 2012 07:24 |
|
the kawaiiest posted:I'm looking for a free, two-column responsive minimalistic theme, preferably without images. Any ideas? Ooh, that's quite a nice theme, I may look at using it myself. When you say "responsive", what exactly do you mean by this?
|
# ? Feb 18, 2012 08:35 |
|
Broccoli Must Die! posted:Ooh, that's quite a nice theme, I may look at using it myself. Unrelated but I just remembered another security plugin that I use, maybe it'll be helpful to you, Rime: http://wordpress.org/extend/plugins/secure-wordpress/
|
# ? Feb 18, 2012 09:16 |
|
A client came to me asking for help with their site, movietriviaapps.com. They want a static front page and a blog secondary page, movietriviaapps.com/blog. As of now this isn't working properly. The static page loads fine, but the designated blog page doesn't load posts. Instead movietriviaapps.com/home/blog does load posts. Why might this be? I've gone in the backend but my PHP knowledge is limited. I've triple-checked the static page/blog page setting under Reading. Also I've changed the template of the blog page, making sure that didn't play a role.
|
# ? Feb 18, 2012 14:21 |
|
Abel Wingnut posted:A client came to me asking for help with their site, movietriviaapps.com. They want a static front page and a blog secondary page, movietriviaapps.com/blog. As of now this isn't working properly. Is the Blog page a child page of the Home page? If so, make it a regular top-level page and the yourdomain.com/blog URL should work.
|
# ? Feb 18, 2012 16:00 |
|
What is a ecommerce plugin that everyone recommends? We put our coffeeshop online and want to be able to sell the coffee online. Something easy, looks good, accepts, paypal, credit cards is what we really want.
|
# ? Feb 18, 2012 19:25 |
|
Flaggy posted:What is a ecommerce plugin that everyone recommends? We put our coffeeshop online and want to be able to sell the coffee online. Something easy, looks good, accepts, paypal, credit cards is what we really want. I prefer Cart66 because it doesn't try to do too much. It handles the shopping functions and leaves the templating and page structure up to WordPress. I've never needed to use the paid version, so I can't speak to those features. I built one site with WP e-Commerce and it was a giant pain in the rear end. Lots of bugs, no decent/up-to-date documentation, and you have to reverse engineer their default theme to make your own templates for it. I've never used WooCommerce, but it looks nice.
|
# ? Feb 18, 2012 19:34 |
|
Thanks for the quick reply, I tried playing with WP e-commerce and yes, it was a huge pain in the rear end. I am going to give Cart66 a try and take a look at Woo Commerce.
|
# ? Feb 18, 2012 20:10 |
|
Stuart McSlim posted:Is the Blog page a child page of the Home page? If so, make it a regular top-level page and the yourdomain.com/blog URL should work. I changed it to a child of home trying to diagnose the issue but changed it to parentless after that didn't help.
|
# ? Feb 19, 2012 16:30 |
|
|
# ? May 13, 2024 22:55 |
|
WooCommerce gets my vote - it is pretty slick and handles most every job I've had to do swimmingly.
|
# ? Feb 19, 2012 22:54 |