imjscn
Forum Replies Created
-
Forum: Everything else WordPress
In reply to: What about Resource Box?If you want a standard option to add extra content for each article, I think you need to add post meta box for that job. With some php experience, you can code it. Google search “Post Options”, you will get a well done script created by hybrid theme users. (sorry I didn’t bookmark that link). With this script, you will have extra input options for posts, but you need to code the output by yourself.
Another way is to use Custom Field Template Plugin. With this plugin, you don’t need to deal with codes, and it provide shortcodes for output.Forum: Hacks
In reply to: how to save to post meta without input box?Here’s a summary of my codes:
Class Math{ var: $id; //I want to map this id to post_id var: $a; var: $b; var: $c; function calculate{ $this->a = $value_from_post_meta_input_box; $this->b = $data_generated_in_calculating_process; $this->c = $result_of_some_function; } }
After active the plugin, and setup the post meta input box for $a, I am able to get $a saved in post meta.
Now, how can I save $b and $c ? How to say the current calculation is an instance of Math with current post_ID ?Forum: Everything else WordPress
In reply to: how To insert contents before Post Title box?OMG, that’s the ultimate solution! Big Thanks!
Forum: Everything else WordPress
In reply to: Can I insert long value into an array with width of 3 ?by the way, I don’t understand “$this” in this line:
'contents' => Array(&$this, 'metabox_end')
This Array is within a function, “$this” here means this function or the component that this function belongs to?Forum: Plugins
In reply to: How to insert a post content into another post?hello?
Forum: Everything else WordPress
In reply to: Can I insert long value into an array with width of 3 ?@ipstenu ,
in EventPress, this array is to store the meta dataArray( Array( 'width' => 4, 'id' => 'start', 'contents' => Array(&$this, 'metabox_start') ), Array( 'width' => 6, 'id' => 'end', 'contents' => Array(&$this, 'metabox_end') ), ),
the value is saved in post meta.
I want to add some other keys in this array.
Maybe the width is not for the post meta table, instead, the width might mean to be used in displaying html in front end. I don’t know.Forum: Hacks
In reply to: need help in understanding one line codeThanks, alchymyth! That helps a lot!
Forum: Everything else WordPress
In reply to: Can I have the same funtion name in 2 different plugins?Thanks, esmi!
Forum: Everything else WordPress
In reply to: Can I have the same funtion name in 2 different plugins?Thanks, I will change them.
How about the variables, those $something ?Forum: Fixing WordPress
In reply to: Trailling slash is missingI just digged out the answer– it’s a problem caused by Buddypress. They are working on a solution but the solution won’t come before BP 1.4
Currently, r-a-y provides a patch to work around, but no details on how and where to add the patch.
https://trac.buddypress.org/ticket/2681Forum: Everything else WordPress
In reply to: Spammer eating too much bandwidth@Irastart, thanks for the information. I checked the CloudFlare, it looks promissing. I will try it. Not sure if it suit for BuddyPress, coz CloudFlare uses cache (they said they cache only css and js), buddypress has many contents that need to be updated dynamiclly.
Forum: Everything else WordPress
In reply to: Spammer eating too much bandwidthI contacted the host, they helped testing the code in first link. They replied saying it’s working on the site they tested. They said the first line, RewriteCond %{REQUEST_METHOD} POST , requires form submittion without browser, maybe that’s what not working.
spammers on my site come through a browser (Mozilla) , they don’t have a referral link. So I guess their software must have a build-in browser and they have buddypress register page bookmarked and visit “register” page from there.Forum: Everything else WordPress
In reply to: Spammer eating too much bandwidthBoth not working.
The 2nd link uses country block, the spammer’s IP are mostly the USA IP, which is my blog’s targeted area. there are some IP from China, but my blog welcom Chinese. So, I can’t use country block.
So, now I back to think about the first link. In the method, line 4, the url expression sounds not match my site. my site url looks like this: https://domain.com/*
in line 4, you see there’s a dot and a star before domain, and there’s a dot after domain.# BEGIN ANTISPAMBLOG REGISTRATION RewriteCond %{REQUEST_METHOD} POST RewriteCond %{REQUEST_URI} .yourbpsignupslug* RewriteCond %{HTTP_REFERER} !.*yourhomedomain.* [OR] RewriteCond %{HTTP_USER_AGENT} ^$ RewriteRule (.*) https://die-spammers.com/ [R=301,L] # END ANTISPAMBLOG REGISTRATION
Forum: Everything else WordPress
In reply to: Spammer eating too much bandwidth@ipstenu,
The above link doesn’t help either.
I’m guessing, maybe because my WP is sub-directory install,so I should edite this line:
RewriteCond %{HTTP_REFERER} !.*yourhomedomain.* [OR]
to this:
RewriteCond %{HTTP_REFERER} !.*yourhomedomain/* [OR]
???
Forum: Everything else WordPress
In reply to: Alternative Ad Services besides Adsense?How about google’s dfp? You host ads on your own, deal with advertizers directly, Adsense and other ads are under dfp management.