Darryl Erentzen
Forum Replies Created
-
You could just create your own shortcode to do it:
// Add Shortcode function dje_meta( $atts ) { // Attributes $atts = shortcode_atts( array( 'meta_key' => 'display_name', 'id' => '1', 'type' => 'user', ), $atts, 'show_meta' ); if($atts['type'] == 'user') { $output = get_user_meta( $atts['id'], $atts['meta_key'], true ); } if($atts['type'] == 'post') { $output = get_post_meta( $atts['id'], $atts['meta_key'], true ); } return $output; } add_shortcode( 'show_meta', 'dje_meta' );
… Or you could make your own shortcode by putting the following into your theme’s “functions.php”:
function my_fb_social_commenting () { echo '<div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <div class="fb-comments" data-href="https://"' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'].'" data-numposts="5" data-colorscheme="light"></div>'; } add_shortcode('my_fb_comments','my_fb_social_commenting');
Then just use [my_fb_comments] wherever you want.
Forum: Plugins
In reply to: [Sidebar Login] Login redirect doesn't work after last updateI’ve just encountered this, as well. Am wondering if it has anything to do with the fact that it’s a multi-site installation.
Forum: Plugins
In reply to: [Link Library] [Plugin: Link Library] Link Acknowledgement Short codeLOL or shoot me $50 and I’ll do it for you ??
Forum: Plugins
In reply to: [Link Library] [Plugin: Link Library] Link Acknowledgement Short codeoops duplicate post
Forum: Plugins
In reply to: [Link Library] [Plugin: Link Library] Link Acknowledgement Short codelol if you DO want to put the variables into shortcodes because you don’t want to mess with buffer overflow issues, here’s how:
//[foobar] function foobar_func( $atts ){ return "foo and bar"; } add_shortcode( 'foobar', 'foobar_func' );
This will create [foobar] shortcode that returns as: foo and bar.
I’m sure you get the idea. It’s pretty simple.
If you go this route, give your code to Jack so he can include it in the next update and you don’t have to worry about losing your work. ??
Forum: Plugins
In reply to: [Link Library] [Plugin: Link Library] Link Acknowledgement Short codeThe above is a quick-and-dirty kludge.
The really elegant solution would be to make the variables available via a shortcode, but this isn’t an option I have time to explore right now.
Maybe Jack will get around to it at some point, since I think a lot of people would like to be able to do this.
Forum: Plugins
In reply to: [Link Library] [Plugin: Link Library] Link Acknowledgement Short codeComment out lines 251 and 252 in “usersubmission.php”
if ($valid == false && ($options['showcaptcha'] == true || $options['showcustomcaptcha'] == true)) {
and line 300
}
This will force the form variables to be passed in the query_string regardless of the status of the submission.
Then you can use a plugin like “Exec-PHP” (https://bluesome.net/post/2005/08/18/50/) to enable php in your admin posts/pages/widgets and output the data using
echo '<p>Label: ' . $_GET['variablename'] . '</p>';
or a foreach loop or what-have-you.
You’re limited by the maximum length of a query string, but since it’s usually a few thousand characters (depends on server, browser, language) you’re probably safe there.
You may also want to add length checks to all incoming data to prevent buffer overrun attacks via this page.
The downside to this is that to preserve your changes you’ll have to edit “usersubmission.php” every time there’s an update to the plugin.
Forum: Plugins
In reply to: [Link Library] [Plugin: Link Library] How can I improve the search?Great plugin, Yannick! Thanks for making it!
When I’m rich or in the neighborhood I’ll buy you a gargleblaster.
Forum: Plugins
In reply to: [Link Library] [Plugin: Link Library] Add heading style to Category HeadingDid you try putting the style attributes you want into
.linklistcatname h2 { // style info here }
in your style sheet?
Forum: Plugins
In reply to: [Link Library] [Plugin: Link Library] Links with logos / imagesLook in Dashboard->Link Library->Library Settings->Link Sub-Field Configuration Table
If you can’t figure it out from there you need to hire someone to do it for you.
Forum: Plugins
In reply to: [Link Library] [Plugin: Link Library] Import produces errorWho’s your ISP?
If you send a link to the site in question I may be able to help.
Place the following code into a file in your web root somewhere:
<?php phpinfo(); ?>
Then open it in a web browser and it’ll list all your php settings (assuming the ISP hasn’t disabled this function).
allow_url_fopen
value is in theCore
section of the report.Forum: Plugins
In reply to: [Link Library] [Plugin: Link Library] User link submission errorForum: Plugins
In reply to: [Link Library] [Plugin: Link Library] Error on submissionI figured it out.
It’s just a typo in the php code. He mistyped the name of the function.
Edit “/wp-content/plugins/link-library/usersubmission.php” on line 201 and change
add_query_var
toadd_query_arg
.Fixed!
Forum: Plugins
In reply to: [Link Library] [Plugin: Link Library] Link Acknowledgement Short codeDashboard->Link Library->General Moderation Options->Link Acknowledgement URL
hover over the description.
is this what you were looking for?