brvnbld
Forum Replies Created
-
Wow, It worked amazingly , Your plugin is undoubtedly the number one in ads and code insertion.
.page-list-ext-title this is the element I want to append to show after html element , but for all the elements this is the same selector. How do I insert one block after the first element, next block in the next element.
To be clear, How to filter pages to show from a local language category??
Forum: Plugins
In reply to: [MP3-jPlayer] Randomize url every 5 minutes or so?Like if someone wants to copy the url, that url should be valid only for 5 minutes, or so.
Simply put, Making scraping useless.will there be an option to increase frequency of the ads?. Like time interval between the ad codes get refreshed?.
Forum: Developing with WordPress
In reply to: How to replace shortcode with its result into the database?`function updatesc_database( $post ) {
if ( empty($post) ) global $post;
if ( empty($post) || ! isset($post->post_content) ) return false;
$content = $post->post_content;
$shortc1='[media:’;
$foldername=get_the_title( $post );
$shortc2=$foldername.’]’;
$shortwh=’\”.$shortc1.$shortc2.’\”;
$replace = do_shortcode( $shortwh );
$content = str_replace( $shortwh, $replace, $content );
return $content;
}’Will this work?
Forum: Developing with WordPress
In reply to: How to replace shortcode with its result into the database?1.Actually my website is in google compute engine, and it has only 10gb of space. The space in compute engine is costly. So I have created a good storage bucket, and am storing files there.
This plugin,(media downloader), lists files only from locally hosted folders.(with their meta data).
If I convert the shortcode to static, then I can replace the urls alone to point to the bucket.
2.Plugins causes heavy load on website which in turn makes website slower.
3.Shortcode’s content cannot be searched.Forum: Developing with WordPress
In reply to: How to replace shortcode with its result into the database?function get_replaced_sourcecode_sc( $post ) { if ( empty($post) ) global $post; if ( empty($post) || ! isset($post->post_content) ) return false; $content = $post->post_content; if ( preg_match_all( '/'. get_shortcode_regex() .'/s', $post->post_content, $matches ) && array_key_exists( 2, $matches ) && in_array( 'media', $matches[2] ) ) { foreach ( $matches[2] as $i => $sc ) { if ( $sc == 'media' ) $now = $matches[0][$i]; $replace = do_shortcode($now); $content = str_replace( $now, $replace, $content ); } } return $content; }
I tried this code, am I missing something?.
The shortcode is
[media:Raavan(2010)]
The text Raavan(2010) is the post name. It varies with post.
btw, thank you guys, you are just so helpful.