Jesper Johansen (jayjdk)
Forum Replies Created
-
Forum: Plugins
In reply to: [Youtube Profile Field] [Plugin: Youtube Profile Field] All usersAccording to this post you can’t
https://www.ads-software.com/support/topic/show-registration-date-in-user-list-sortableForum: Plugins
In reply to: [Youtube Profile Field] [Plugin: Youtube Profile Field] All usersNot that I can think of. Maybe you can with javascript/jQuery.
Forum: Plugins
In reply to: [Youtube Profile Field] [Plugin: Youtube Profile Field] All usersMy mistake!
Try this:
function stergos_ypf_all_users() { $users = get_users(); if ( $users && function_exists( 'ypf_show_video' ) ) : foreach ( $users as $user ) { $text .= 'Videos from ' . $user->user_nicename; $text .= ypf_show_video( array( 'user_id' => $user->ID ) ); } return $text; endif; return; } add_shortcode( 'ypf-all', 'stergos_ypf_all_users' );
Forum: Plugins
In reply to: [Youtube Profile Field] [Plugin: Youtube Profile Field] All usersHere it is as a shortcode:
function stergos_ypf_all_users() { $users = get_users(); if ( $users && function_exists( 'ypf_show_video' ) ) : foreach ( $users as $user ) { $text = 'Videos from ' . $user->user_nicename; $text .= ypf_show_video( array( 'user_id' => $user->ID ) ); } return $text; endif; return; } add_shortcode( 'ypf-all', 'stergos_ypf_all_users' );
When use the shortcode:
[ypf-all]
… Again untested but should work2. Something like this:
<?php function stergos_ypf_user_table( $column ) { $column['youtube'] = 'Youtube username'; return $column; } add_filter( 'manage_users_columns', 'stergos_ypf_user_table' ); function stergos_ypf_modify_user_table_row( $val, $column_name, $user_id ) { $user = get_userdata( $user_id ); switch ($column_name) { case 'youtube' : return $user->youtube; break; default: } return $return; } add_filter( 'manage_users_custom_column', 'stergos_ypf_modify_user_table_row', 10, 3 ); ?>
Forum: Plugins
In reply to: [Youtube Profile Field] [Plugin: Youtube Profile Field] All usersHello,
You can make a PHP loop that goes through every user and display their videos.
Something like this (untested):
$users = get_users(); if ( $users && function_exists( 'ypf_show_video' ) ) : foreach ( $users as $user ) { echo 'Videos from ' . $user->user_nicename; echo ypf_show_video( array( 'user_id' => $user->ID ) ); } endif;
2. What do you mean by “it would be useful the youtube username to display in users.php like name.” ??
Forum: Themes and Templates
In reply to: [Theme: Sundance] Can't create child theme!Try removing all the content from the child theme functions.php
Forum: Plugins
In reply to: [Jayj Quicktag] [Plugin: Jayj Quicktag] Quicktags not displaying?It’s because you’re using single quotes.
I’ve just updated the plugin to version 1.2.3
It should work again if you update.
– Jesper
Forum: Plugins
In reply to: [Jayj Quicktag] [Plugin: Jayj Quicktag] Quicktags not displaying?Could you please post a screenshot of the Quicktags settings page and a page with the editor?
Forum: Plugins
In reply to: [Jayj Quicktag] [Plugin: Jayj Quicktag] EnhancementsThe new version should be out now ??
Forum: Plugins
In reply to: [Jayj Quicktag] [Plugin: Jayj Quicktag] EnhancementsGreat idea!
I was actually working with some similar functionality for a theme yesterday. I’ll see if I can integrate it in the plugin
Thanks for the feedback
Forum: Plugins
In reply to: [Jayj Quicktag] [Plugin: Jayj Quicktag] Need support for more complex tagsAwesome!
If you want to seperate your code from the plugin so you can update without losing the button, you can create a new plugin
I think this will work https://pastie.org/3049341
Forum: Plugins
In reply to: [Jayj Quicktag] [Plugin: Jayj Quicktag] Need support for more complex tagsThis is the whole file https://gist.github.com/1499184
Forum: Plugins
In reply to: [Jayj Quicktag] [Plugin: Jayj Quicktag] Need support for more complex tagsHello.
Thanks for the feedback. But that out of the scope of this plugin, in my opinion. My goal is to make it as simple as possible
But I’ve worked on something for you that will give you a video button with prompts for parameters
https://gist.github.com/1498031
It’s not perfect and you should change it to fit your exact needs
It can be added to the plugin. If you do so, add it after the foreach loop around line 320
Hope that helps you ??
Hello,
I’ve tried to customize the script to fit your needs:
Your theme author.php (this might work – it based on your theme – I can take a look at your theme if it doesn’t)
if ( function_exists('ypf_show_video') ) echo do_shortcode( '[youtube-user id="' . get_user_meta( get_the_author_meta( 'ID' ), 'ypf_video', true ). '"]' );
It will add a text field to the user profile: https://i.imgur.com/prvhq.png
Here’s the code you should add to the plugin index.php (you have to add it again if you update the plugin)
Hope that helps you and sorry for the long reply
Forum: Plugins
In reply to: [OptionTree] [Plugin: OptionTree] allow shortcodes in textareaor
echo do_shortcode( $textarea );