Adding Blog ID link in Automessage email

Hello,

Using Automessage plugin, I'd like to provide a new blog user with the url of their website account so they can provide payment after their trial is over. ex. https://automotivewebsource.com/automotive-web-source/?bid=XXX

Can you explain what each of these does, or simply let me know which I would use for this?

%blogname% %blogurl% %username% %usernicename% %sitename% %siteurl% %systemname% %systemurl%

Thanks,
Chris

  • Saurabh
    • New Recruit

    Hi @Christopher,

    As an interim measure, please edit /plugins/automessage/classes/class.user.php. At about line 45, you'll find this code:

    if(function_exists('get_blog_option')) {
    					$replacements = array(	"/%blogname%/" 	=> 	get_blog_option( $blog_id,'blogname'),
    											"/%blogurl%/"	=>	untrailingslashit(get_blog_option( $blog_id,'home')),
    											"/%username%/"	=>	$this->user_login,
    											"/%usernicename%/"	=>	$this->user_nicename
    										);
    				} else {
    					$replacements = array(	"/%blogname%/" 	=> 	get_option('blogname'),
    											"/%blogurl%/"	=>	untrailingslashit(get_option('home')),
    											"/%username%/"	=>	$this->user_login,
    											"/%usernicename%/"	=>	$this->user_nicename
    										);
    				}

    Just after this code, add this line:

    $replacements["/%blogid%/"] = $blog_id;

    After this, you'll be able to use %blogid%, as well.

    Please note that, this will be overwritten on the next update and you'd need to redo this.

    I'm marking this thread as a feature request to see if more people would like this option and if we should add this to the plugin, itself.

    Best

    Saurabh

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.