How to get the "new blog template" theme viewer

Please, how can I get the theme viewer from the new blog template plugin? Separated from the signature view, only to let users see the themes... tks.

  • diegpl
    • Syntax Hero

    I saw that maybe this peace of code bring me the themes preview:

    <div id="blog_template-selection">
    <h3><?php _e('Select a template', 'blog_templates') ?></h3>

    <?php
    if ( $settings['show-categories-selection'] )
    $templates = nbt_theme_selection_toolbar( $templates );
    ?>

    <div class="blog_template-option">

    <?php
    foreach ($templates as $tkey => $template) {
    nbt_render_theme_selection_item( 'previewer', $tkey, $template, $settings );
    }
    ?>
    <div style="clear:both;"></div>
    </div>
    </div>

  • diegpl
    • Syntax Hero

    * Theme screenshot selection template.
    *
    * Copy this file into your theme directory and edit away!
    * You can also use $templates array to iterate through your templates.

    What it means? I found it at blogtemplatefiles/template/blog_templates-registration-screenshot.php

    I am needing to get my template list, like a theme preview, but not inside my theme. I want to get it inside the wp-signup.php file. But before the user give make the login.

  • diegpl
    • Syntax Hero

    How can I get this files to make my static html works? Or have a real way to do this? tks.

    "<script type='text/javascript' src='http://userdev.com.br/wp-includes/js/jquery/ui/jquery.ui.core.min.js?ver=1.10.3'></script>";
    	"<script type='text/javascript' src='http://userdev.com.br/wp-includes/js/jquery/ui/jquery.ui.widget.min.js?ver=1.10.3'></script>";
    	"<script type='text/javascript' src='http://userdev.com.br/wp-includes/js/jquery/ui/jquery.ui.tabs.min.js?ver=1.10.3'></script>";
    	"<script type='text/javascript' src='http://userdev.com.br/wp-includes/js/jquery/ui/jquery.ui.accordion.min.js?ver=1.10.3'></script>";
    	"<script type='text/javascript' src='http://userdev.com.br/wp-includes/js/jquery/jquery.color.min.js?ver=2.1.1'></script>";
    	<script type='text/javascript'>
    	/* <![CDATA[ */
    	var mejsL10n = {"language":"en-US","strings":{"Close":"Close","Fullscreen":"Fullscreen","Download File":"Download File","Download Video":"Download Video","Play\/Pause":"Play\/Pause","Mute Toggle":"Mute Toggle","None":"None","Turn off Fullscreen":"Turn off Fullscreen","Go Fullscreen":"Go Fullscreen","Unmute":"Unmute","Mute":"Mute","Captions\/Subtitles":"Captions\/Subtitles"}};
    	/* ]]> */
    	</script>
    	<script type='text/javascript' src='http://userdev.com.br/wp-includes/js/mediaelement/mediaelement-and-player.min.js?ver=2.13.0'></script>
    	<script type='text/javascript'>
    	/* <![CDATA[ */
    	var _wpmejsSettings = {"pluginPath":"\/wp-includes\/js\/mediaelement\/"};
    	/* ]]> */
    	</script>
    	<script type='text/javascript' src='http://userdev.com.br/wp-includes/js/mediaelement/wp-mediaelement.js?ver=3.8.3'></script>
  • diegpl
    • Syntax Hero

    so, now I discovered that if I have these, the category filter is gonna work. But not the rest.. :disappointed:

    I am not asking something difficult, I want it working static... that would be already enough good for now...

    <script type='text/javascript'>
    /* <![CDATA[ */
    var export_to_text_js = {"ajaxurl":"http:\/\/userdev.com.br\/wp-admin\/admin-ajax.php","imagesurl":"http:\/\/userdev.com.br\/wp-content\/plugins\/blogtemplates\/blogtemplatesfiles\/assets\/images\/"};
    /* ]]> */
    </script>
    
    <script type='text/javascript' src='http://userdev.com.br/wp-content/plugins/blogtemplates/blogtemplatesfiles/assets/js/toolbar.js?ver=3.8.3'></script>
  • diegpl
    • Syntax Hero

    ok, now I found this code at blogtemplates/blogtemplates.php:

    Now the static template preview is running better, but not complete yet... still waiting for help. tks.

    <style>
    	.theme-previewer-wrap:hover img {
    		opacity:0.5;
    	}
    	.theme-previewer-wrap:hover .theme-previewer-overlay {
    		display:block;
    	}
    	.theme-previewer-overlay {
    		display:none;
    		position:absolute;
    		top:50%;
    		opacity:1;
    		width:100%;
    		margin-top:-25%;
    		box-sizing:border-box;
    		white-space: nowrap;
    		text-align: center;
    	}
    	.view-demo-button {
    		font-size:90%;
    	}
    	.select-theme-button {
    		font-size:100%;
    		font-weight:bold;
    	}
    	.template-name {
    		display:inline-block;
    		font-size:100%;
    		color:white;
    		text-shadow:1px 1px 1px black;
    	}
    </style>
    <script type="text/javascript">
    jQuery(document).ready(function($) {
    	$(document).on( 'click', '.view-demo-button, .select-theme-button', function(e) {
    		e.preventDefault();
    		var theme_key = $(this).data('theme-key');
    		var wrap = $('#theme-previewer-wrap-' + theme_key );
    		$('.theme-previewer-wrap').removeClass('blog_template-default_item');
    		wrap.addClass('blog_template-default_item');
    
    		$('input[name=blog_template]').attr('checked',false);
    		$('#blog-template-radio-' + theme_key).attr('checked',true);
    	});
    	$(document).on('click', '.view-demo-button', function(e) {
    		e.preventDefault();
    		window.open($(this).data('blog-url'));
    	});
    });
    </script>
  • Michael Bissett
    • Recruit

    Hi @diegpl,

    Apologies for the delay, there's been quite a bit going on lately over here.

    In looking over your request, I'd like to ask the following:

    -If you're wanting to allow users the ability to choose the theme to use when signing up, how about using a plugin like this:

    http://buddydev.com/plugins/select-blog-theme-at-blog-signup/

    That looks to do what you're trying to come up with here. :slight_smile:

    -If you're wanting to have users preview a theme before they sign up, why not use this:

    https://premium.wpmudev.org/project/advanced-theme-switcher/

    And have a page available using the [adv_theme_switcher] shortcode? I'm recommending a page because different themes can have different places for things (like widgets, for example).

    Does this help? Or am I not quite hitting the mark here? Please let me know if this helps or not.

    Regards,
    Michael

  • diegpl
    • Syntax Hero

    Hi, tks for the answer.

    About the http://buddydev.com/plugins/select-blog-theme-at-blog-signup/, it is not clear for me why it is an option. Because wp-signup.php has 3 steps, The first one, to create the user, the second one to create the site, and the third one is the success page. "New blog templates" will insert the templates at the second step. This other one will insert the templates at the first step and keep it in the third? It will give me the templates I created or only the empty theme to choose?

    And the https://premium.wpmudev.org/project/advanced-theme-switcher/ is only to let the user change the theme with my current content?

    Thank you!

  • Michael Bissett
    • Recruit

    Hi @diegpl,

    Yes, the Advanced Theme Switcher plugin can do that. :slight_smile:

    In regards to your first question, perhaps I should back up a bit, and ask... what are you looking to achieve on your site?

    Right now, it sounds like you're wanting to have the template selector show up on the first page of the signup process, and also have a template previewer elsewhere on the site (so that visitors can preview the templates you've set up).

    Is that what you're looking for? Or am I wrong? If I am, please define what it is you're looking for, so that I can help you better. :slight_smile:

    Regards,
    Michael

    P.S. At present, you can have the templates show up on the second page of the signup process, with the option to preview the template.

  • diegpl
    • Syntax Hero

    My site is only the wp-signup.php page. So what I want is a way to show my templates in the first and third step of the signup navigation.

    So, about the http://buddydev.com/plugins/select-blog-theme-at-blog-signup/, it will insert the templates at the first step and keep it in the third? And it will get only the themes or my templates, or the themes with my current content, like the theme preview?

    About https://premium.wpmudev.org/project/advanced-theme-switcher/, it gets my templates or only the theme list with the current site content?

    tks.

  • Michael Bissett
    • Recruit

    Hey @diegpl,

    First off, thanks for clarifying what it is you're wanting here. :slight_smile:

    As for this:

    http://buddydev.com/plugins/select-blog-theme-at-blog-signup/

    It looks like it'd do it on the 2nd step, so that's not going to work here.

    As for this:

    https://premium.wpmudev.org/project/advanced-theme-switcher/

    This only deals with the themes you have available on the site (the site they're signing up through), not the templates you'd set up through our New Blog Templates plugin.

    Now, as for the modifying of wp-signup, here's what I know:

    First, you'll probably want to create a custom wp-signup page, so that you'll be more able to make customizations to it (without losing changes, due to a WordPress update). Here's how you can create a custom signup page:

    https://premium.wpmudev.org/forums/topic/custom-registration-page-mostly-style-and-wording-for-multisite

    Now, for the template selector itself.

    The action adding the template selector to the signup form in that area on the 2nd page is located in /blogtemplates/blogtemplatefiles/blog_templates.php, on line 49:

    add_action( 'signup_blogform', array( $this, 'registration_template_selection' ) );

    You'll need to unhook that and then hook it into something like signup_extra_fields. But that would be before "Gimme a site".

    You'll probably want to make it so that it shows the template selector only when "Gimme a site" is selected. Maybe some jQuery magic there.

    I've flagged our Second Line Staff here, since going into more detail on this is outside of my experience. :slight_smile:

    Regards,
    Michael

  • diegpl
    • Syntax Hero

    Ok, that link only gave me this: https://premium.wpmudev.org/forums/topic/custom-registration-page-mostly-style-and-wording-for-multisite#post-650844

    I tried to insert it through register_form hook. But it didn`t work:
    http://codex.wordpress.org/Plugin_API/Action_Reference/register_form

    But your solution about the 'signup_extra_fields' was really the best one:
    add_action( 'signup_extra_fields' , array( $this, 'registration_template_selection' ) );

    But it worked only when inserted at /blogtemplates/blogtemplatefiles/blog_templates.php

    I need to insert this line like in a plugin, so I don`t lose it when wpmudev upgrade the "New blog templates" plugin. Do you know how to do that? If I am inserting it in another php file, in a plugin for example, I am getting this error:

    Notice: Undefined variable: this in D:\xampp\htdocs\xxxxxx\wp-content\plugins\edit-wp-signup\insert-it-at-head.php on line 22

    Thank you.

  • PC
    • WPMU DEV Initiate

    Hey there,

    As quoted by my colleague Tim,

    You're getting that error because the path is still wrong.

    So if you're in:

    /wp-content/themes/themename/

    You need to go back to root of your WP install where the actual wp-load.php file is.

    require( '../../../wp-load.php' );

    Cheers, PC

  • diegpl
    • Syntax Hero

    Ok, I inserted it, and now I am getting this error:

    Warning: require(../../../wp-load.php): failed to open stream: No such file or directory in D:\xampp\htdocs\xxxxxxxxx\wp-content\themes\twentyfourteen\page-templates\custom-signup.php on line 15

    Fatal error: require(): Failed opening required '../../../wp-load.php' (include_path='.;D:\xampp\php\PEAR') in D:\xampp\htdocs\xxxxxxxxx\wp-content\themes\twentyfourteen\page-templates\custom-signup.php on line 15

  • diegpl
    • Syntax Hero

    By my understatement in the first step, it is getting the file at:

    require( './wp-load.php' );

    require( './wp-blog-header.php' );

    but after I process the action at wp-content/themes/twentyfourteen/page-templates/custom-signup.php, it is needing this patch you gave me:
    require( '../../../wp-load.php' );

    It is strange that another guy had got it on this way...

    Any ideas? Tks!

  • diegpl
    • Syntax Hero

    I even tried to put it like in the original wp-signup.php:

    require( dirname(__FILE__) . '/wp-load.php' );
    require( dirname( __FILE__ ) . '/wp-blog-header.php' );

    But I got this error:

    Warning: require(D:\xampp\htdocs\userdev-br-2\wp-content\themes\twentyfourteen\page-templates/wp-load.php): failed to open stream: No such file or directory in D:\xampp\htdocs\userdev-br-2\wp-content\themes\twentyfourteen\page-templates\custom-signup.php on line 15
    
    Fatal error: require(): Failed opening required 'D:\xampp\htdocs\userdev-br-2\wp-content\themes\twentyfourteen\page-templates/wp-load.php' (include_path='.;D:\xampp\php\PEAR') in D:\xampp\htdocs\userdev-br-2\wp-content\themes\twentyfourteen\page-templates\custom-signup.php on line 15
  • diegpl
    • Syntax Hero

    Now I tried:

    require( home_url(). '/wp-load.php' );
    require( home_url(). '/wp-blog-header.php' );

    And I got this error:

    Warning: require(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in D:\xampp\htdocs\userdev-br-2\wp-content\themes\twentyfourteen\page-templates\custom-signup.php on line 15
    
    Warning: require(http://localhost/userdev-br-2/wp-load.php): failed to open stream: no suitable wrapper could be found in D:\xampp\htdocs\userdev-br-2\wp-content\themes\twentyfourteen\page-templates\custom-signup.php on line 15
    
    Fatal error: require(): Failed opening required 'http://localhost/userdev-br-2/wp-load.php' (include_path='.;D:\xampp\php\PEAR') in D:\xampp\htdocs\userdev-br-2\wp-content\themes\twentyfourteen\page-templates\custom-signup.php on line 15
  • diegpl
    • Syntax Hero

    Now I tried in a static way:

    require( 'http://localhost/xxx/wp-load.php' );
    require( 'http://localhost/xxx/wp-blog-header.php' );

    But I got this error:

    Warning: require(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in D:\xampp\htdocs\xxx\wp-content\themes\twentyfourteen\page-templates\custom-signup.php on line 15
    
    Warning: require(http://localhost/xxxx/wp-load.php): failed to open stream: no suitable wrapper could be found in D:\xampp\htdocs\userdev-br-2\wp-content\themes\twentyfourteen\page-templates\custom-signup.php on line 15
    
    Fatal error: require(): Failed opening required 'http://localhost/xxxx/wp-load.php' (include_path='.;D:\xampp\php\PEAR') in D:\xampp\htdocs\xxxx\wp-content\themes\twentyfourteen\page-templates\custom-signup.php on line 15
  • Timothy
    • Chief Pigeon

    Hey again.

    I thought I recognised you, you applied for a job here in October. :slight_smile:

    require( './wp-load.php' );

    require( './wp-blog-header.php' );

    but after I process the action at wp-content/themes/twentyfourteen/page-templates/custom-signup.php, it is needing this patch you gave me:
    require( '../../../wp-load.php' );

    It is strange that another guy had got it on this way...

    You need to look at the code you're using there and how many directories deep you are wp-content/themes/twentyfourteen/page-templates/ and then look at how many folders you're going back ../../../

    Take a look at your other error:

    Warning: require(): http:// wrapper is disabled in the server configuration by allow_url_include=0

    And wp-load.php is what brings in all the WP goodness :slight_smile:

    Hopefully that should help. :slight_smile:

    Take care.

  • diegpl
    • Syntax Hero

    Hei, yes, this is me. After that I decided to come to Silicon Valley, to study more about programming languages and improve my english, to apply for the next time :smiley:

    I know about the deep patch, but the problem is, when I use a cutom wp-signup in my theme folder wp-content\themes\twentyfourteen\page-templates\custom-signup.php and the require is used in the first time it works with this:

    require( './wp-load.php' );
    require( './wp-blog-header.php' );

    But after the first submit I need to change the patch, because the action will take me to the wp-content\themes\twentyfourteen\page-templates\custom-signup.php url, so the patch will be different. Because when the require was used in the first time I was in a different url using my custom wp-signup.php like a page template...

    But actually, saying this to you know now, I think I am being silly inserting this wp-content\themes\twentyfourteen\page-templates\custom-signup.php in the action. Should I insert the first url of the page I am using like a custom wp-signup.php template, right?

    And about how to insert the action at /blogtemplates/blogtemplatefiles/blog_templates.php, I need to insert a require of this page in my php plugin file to it works? I will publish my solution like a jquery plugin. It is done already ( it is a smaller signup - userdev.com.br/wp-signup.php ), but I still need to solve this problem too: https://premium.wpmudev.org/forums/topic/how-to-get-the-new-blog-template-theme-viewer#post-656968

    Thank you!

  • diegpl
    • Syntax Hero

    Ok, it is working at home with a template getting custom-signup.php

    I changed all the actions to the main url and my head now is like this, without that requires:

    /** Sets up the WordPress Environment. */
    //require( './wp-load.php' ); because it warning me the file was appearing twice
    //add_action( 'wp_head', 'wp_no_robots' ); I do`t want they blocking my main site
    //require( './wp-blog-header.php' ); I removed it because I tried without and worked

    But I still need to solve this:

    And about how to insert the action at /blogtemplates/blogtemplatefiles/blog_templates.php, I need to insert a require of this page in my php plugin file to it works? I will publish my solution like a jquery plugin. It is done already ( it is a smaller signup - userdev.com.br/wp-signup.php ), but I still need to solve this problem too: https://premium.wpmudev.org/forums/topic/how-to-get-the-new-blog-template-theme-viewer#post-656968

    Thank you!

  • Timothy
    • Chief Pigeon

    Hey there.

    The original (some years back) needed the files if I recall, as I said in the other thread it's been a while since I've done this but looking at past articles available online it seems like it was the case or a common misconception.

    But thinking about it the template is loaded through the theme and includes all the wp-load goodies anyway. Still, the original errors were due to the path.

    As you're customising the wp-signup form you could add in your own actions, the default ones you can see in there like:

    signup_header
    before_signup_form
    signup_blogform
    signup_extra_fields
    signup_hidden_fields
    signup_finished
    preprocess_signup_form
    after_signup_form

    So you either use one of those or create your own in the template you made.

    You would then need to have the NBT function hook into the exact location you require.

    The original method as you know is registration_template_selection and located in blog_templates.php.

    I guess you're looking for them to click gimme a site, the templates load and then when they select one they get sent to the next page?

    Cheers.

  • diegpl
    • Syntax Hero

    Now I tried insert this on my plugin after remove the action at blog_templates.php file:

    require( plugins_url() . '/blogtemplates/blogtemplatesfiles/blog_templates.php' );
    add_action( 'signup_extra_fields' , array( $this, 'registration_template_selection' ) );

    But I got this error:

    Warning: mysql_connect(): User xxxxxxx already has more than 'max_user_connections' active connections in /home/xxxxxx/public_html/xxxxxx/wp-includes/wp-db.php on line 1147

    So, how can I insert this line add_action( 'signup_extra_fields' , array( $this, 'registration_template_selection' ) );` at blog_templates.php through my plugin? Or there is another way to solve this problem? Tks.

  • diegpl
    • Syntax Hero

    Now I tried to insert this on my php plugin file, but it still didn`t work:

    if ( ! class_exists( 'blog_templates' ) ) {
        class blog_templates {
            function __construct() {
    			add_action( 'signup_extra_fields' , array( $this, 'registration_template_selection' ) );
    		}
    	}
  • diegpl
    • Syntax Hero

    I don`t think this is a host problem, because when I insert this:

    add_action( 'signup_extra_fields' , array( $this, 'registration_template_selection' ) ); }

    at blog_templates.php it is working. That problem is happening because when I require the blog_templates.php file it is inserting all the actions twice. I need to find a way to insert the above action without require blog_templates.php file, so, do you know how can I do that?

    Thank you!

  • diegpl
    • Syntax Hero

    Hi, I just saw this repply: https://premium.wpmudev.org/forums/topic/how-to-get-the-new-blog-template-theme-viewer#post-660068

    About it, I am wanting the templates appearing since the first step until the last one, with the signup_extra_fields I can make it appear at the first and second step, but not in the last one, that is still a problem. But the main problem is how to insert this action add_action( 'signup_extra_fields' , array( $this, 'registration_template_selection' ) ); } at blog_templates.php file or make it work in another place. Because I would like to publish my jquery solution like out of box like an improvement for "New blog templates" wpmudev plugin for the next users with the same problem...

  • Timothy
    • Chief Pigeon

    Hey there.

    Sorry for the delay there, we're quite busy at the moment but we are hiring new staff, in act I have around 5 guys working a trial right now.

    Still, it takes time for them to get up to scratch on everything.

    The notice you mentioned on the other thread isn't an error, it's just a notice and can be turned off by disabling your WP_DEBUG. I didn't read the whole thread but will have someone take a look in a moment.

    Just to backtrack in this thread:

    more than 'max_user_connections' active connections in

    This is an issue relating to the host in that too many connections are open. That doesn't mean it's not caused by PHP. As I mentioned above, you would need to take a look at the connections open and why.

    Could be a persistent connection issue, connections not closing for some other reason, too many concurrent connections, etc. You'd need to check the logs.

    The MySQL limit can be increased to allow more connection if needed.

    You're response here:

    https://premium.wpmudev.org/forums/topic/how-to-get-the-new-blog-template-theme-viewer#post-660079

    Regarding your code here:

    if ( ! class_exists( 'blog_templates' ) ) {
        class blog_templates {
            function __construct() {
    			add_action( 'signup_extra_fields' , array( $this, 'registration_template_selection' ) );
    		}
    	}

    You said this was in your PHP file, by that you mean the one you're making?

    I ask because if that's the case then do you have a method for registration_template_selection?

    Also note that the class blog_templates in your file would only be used it doesn't previously exist because you're running a check to see if ! class_exists and if it doesn't then use your code.

    If you're wanting to extend the class then it would be better to use extend.

    http://www.php.net/manual/en/keyword.extends.php

    It might be best to hire a developer for this:

    https://premium.wpmudev.org/wordpress-development/

    You're going to want to un hook the original action and then rehook it into the location you need.

    Take care.

  • diegpl
    • Syntax Hero

    About the server connections I understood what you told me. But since I was trying to make that new action works calling that require, making a lot of connections again that already existed, it was the reason. So, that was not the best way to reach it.

    About the method for registration_template_selection, I do not need it working in the first step of the subscription. Please, take a look at userdev.com.br, maybe it is gonna clarify to you. I want only bring the themes, the selection does not need to work on this case...

    I believe I made what you told me:

    class improve_subscription extends blog_templates {
    	function __construct() {
    		add_action( 'signup_extra_fields' , array( $this, 'registration_template_selection' ) );
    	}
    }

    Sorry for the "!", I hadn not seen it before... But the code you told me still didn`t work, or I miss something?

    Thank you.

  • diegpl
    • Syntax Hero

    I don`t think that code is a good idea, since the class is being called to show the templates is blog_templates.

    With that I am only creating another class like it and inserting that new action. But the class that is being used is still blog_templates...

    Thank you.

  • Timothy
    • Chief Pigeon

    About the server connections I understood what you told me. But since I was trying to make that new action works calling that require, making a lot of connections again that already existed, it was the reason. So, that was not the best way to reach it.

    We're not talking about queries, you're not querying the database more by removing one action to use the same action in a slightly different location.

    I don`t think that code is a good idea, since the class is being called to show the templates is blog_templates.</blockquote>

    I never said the code was, I simply said that you're checking the class exists and if it doesn't then you're using your code.

    So as the class already exists yours wouldn't run. If you wish to extend the class then you'd need to use extend instead of checking it exists.

    Extending a class does as it describes, it extends allowing you add more as you require.

    If you look at the original that adds the forms:

    // Signup: WordPress
     add_action( 'signup_hidden_fields', array( &$this, 'maybe_add_template_hidden_field' ) );
     add_action( 'signup_extra_fields', array( $this, 'registration_template_selection' ) );
     add_filter( 'add_signup_meta', array( $this, 'registration_template_selection_add_meta' ) );

    You can see what it's doing there.

    So if we want it elsewhere, just as an example (only an example) we could use the signup_extra_fields and this brings it to stage one of the signup process. Please note that if they're already logged in they don't see that stage by default when using the wp-signup page. If you need it elsewhere and there isn't a hook then you'll need to make one.

    I've included a screenshot of a core hack to show it working quickly. I don't of course recommend hacking the core there. Just an example.

    Take care.

  • diegpl
    • Syntax Hero

    I already got it since the beginning. What I am asking is if there is a way to insert this add_action( 'signup_extra_fields', array( $this, 'registration_template_selection' ) ); at blog_templates class, but without hack the file, through my plugin, a different php file. Is that possible in any way? Maybe through a method that already exist there?

  • Timothy
    • Chief Pigeon

    Hey again.

    Ah, sorry, I see the confusion. With your application we spoke about before I thought you'd done this kind of development stuff especially considering CIELO payment gateway you mentioned. So I thought you knew about hooks and just needed pointers to how we do it in the code. Sorry.

    OK, so there are two ways, if you wish to extend the class to add something meaningful in there you could do this:

    class blog_templates_change_signup extends blog_templates {
    	function __construct() {
    		add_action( 'signup_extra_fields', array( $this, 'registration_template_selection' ) );
       	}
    }
    
    $blog_templates = new blog_templates_change_signup();

    But if you're not really extending the class to add something in, then just this:

    add_action( 'signup_extra_fields', array( 'blog_templates', 'registration_template_selection' ) );

    Cheers.

  • diegpl
    • Syntax Hero

    Ok, sorry for that, I missed it. Now I inserted it too and worked well. Even the third step is everything all right. I will post the plugin here as soon they accept it.

    It is made in jquery and works with wpms and "new blog template". All the others I tested were working with wpms only to create users, but not site. Do you know if it exist? Maybe in ajax? It is very strange that doesn`t exist a plugin that accept site creation for wpms and works like a widget or something else...

    Thank you.

  • PC
    • WPMU DEV Initiate

    Hey there,

    Thanks for posting on the forums.

    I saw some times staff people giving points if someone makes a plugin. Is that the case? How does this points work?

    Staff also gives points to our members when they are being helpful on the forums by helping other members out with the knowledge they have. It can not only be creating a plugin or a custom code but also pointing them in the right direction.

    More info here : https://premium.wpmudev.org/earn-your-wpmudev-membership/

    I hope that helps. Please feel free to ask if you have more questions on the same.

    Cheers, PC

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.