Recent Topics

Requesting New Core Widget

started by on Feb 13, 2017 – Last touched: Feb 26, 2017

Feb 13, 2017 17:32    

Please can you include a contact widget in the core widgets. So that if one would like to add a quick contact widget in the footer container it can be done easily.
it can be exactly what one would find in _msgform.disp.php but capable of being added to containers.

Is this possible to do as a widget?

Feb 14, 2017 00:11

I actually made a plugin instead, however please can the dev provide the ability to specify a custom template path for the _contact_msg.form.php in anon_async.php something like:

case 'get_msg_form':
		// display send message form
		$recipient_id = param( 'recipient_id', 'integer', 0 );
		$recipient_name = param( 'recipient_name', 'string', '' );
		$subject = param( 'subject', 'string', '' );
		$email_author = param( 'email_author', 'string', '' );
		$email_author_address = param( 'email_author_address', 'string', '' );
		$redirect_to = param( 'redirect_to', 'url', '' );
		$post_id = NULL;
		$comment_id = param( 'comment_id', 'integer', 0 );
		$BlogCache = & get_BlogCache();
		$Collection = $Blog = $BlogCache->get_by_ID( $blog_ID );
		$template_path = param( 'template_path', 'string', '' );

		locale_activate( $Blog->get('locale') );

		if( $recipient_id > 0 )
		{ // Get identity link for existed users
			$RecipientCache = & get_UserCache();
			$Recipient = $RecipientCache->get_by_ID( $recipient_id );
			$recipient_link = $Recipient->get_identity_link( array( 'link_text' => 'nickname' ) );
		}
		else if( $comment_id > 0 )
		{ // Anonymous Users
			$gender_class = '';
			if( check_setting( 'gender_colored' ) )
			{ // Set a gender class if the setting is ON
				$gender_class = ' nogender';
			}
			$recipient_link = '<span class="user anonymous'.$gender_class.'" rel="bubbletip_comment_'.$comment_id.'">'.$recipient_name.'</span>';
		}

		$blog_skin_ID = $Blog->get_skin_ID();
		if( ! empty( $blog_skin_ID ) )
		{ // check if Blog skin has specific concact message form
			$SkinCache = & get_SkinCache();
			$Skin = & $SkinCache->get_by_ID( $blog_skin_ID );
			$ads_current_skin_path = $skins_path.$Skin->folder.'/';
		}

	if( ! empty( $template_path) && file_exists( $template_path) )
	{ // Template file exists for the current form
		require $template_path;
	}
	else {
	
	require skin_template_path( '_contact_msg.form.php' );
	
	}
	
		break;

Feb 16, 2017 18:22

We have this widget in the works already in some branch. I will pop up in a future release.


Form is loading...

powered by b2evolution – This forum is powered by b2evolution CMS, a complete engine for your website.