Resource icon

Start Conversation from Post Bit 1.3

No permission to download
Can anyone comment on the google access denied errors going up (10,000+ in a day now)?

I suspect it's just what happens when their bot gets an error (need to login), but want to make sure since I've never had anything close to that before.

Can I assume google didn't before follow the links to the overlay screens which then had the "start a conversation" link on them?
 
Holy crap i might need this after all. Some People still dont know how to send pms.
 
Checked my server error log, and saw that I had heaps of errors using 1.1. Updated to latest version, and error free. Shows how committed you are to the add ons you develop.

Thanks Chris.
 
Nice addon, missed this from PHPBB but what is missing is when you use the link on the users box it should quote the text of the post in the PM, that would be even better ;)
 
Nice addon, missed this from PHPBB but what is missing is when you use the link on the users box it should quote the text of the post in the PM, that would be even better ;)

Some users don't want that text added... Sometimes I read and actually remember another question I have for them. If that is the case, simply "copy", click Start Conversation, click "paste". I'd rather do that than have it automatically quote whatever post you are on when deciding to message them.
 
this Add-on is great, but it is a bit confusing for the user when it shows "Start a Conversation" (in the Postbit) when you are in a PC (Private Conversation).
So it might happen that the user will click onto "Start a Conversation" in order to reply to a "Private Conversation" instead of replying in the Editor-Reply-Box.

Is there a way to remove this "Start a Conversation"-Link from the Postbit when user is engaged in a "Private Conversation" ?


Many thanks!
 
What if you're in a multi participant conversation and you want to start a separate conversation?

This caters for that.

I would argue that if the link wasn't there it would be more confusing.
 
Chris, is there a way to get this to open in a separate browser window. I had some code I had installed via TMS, but an add-on has stomped all over where it goes at and I cannot get either one to move. This would work great if it were possible. Also, can the text be styled (like replaced with CSS or a button)?

EDIT:

For the button, you can use CSS to style it. What I am using is
Code:
.conversationPostBitText
{
    color:white;
background: -webkit-linear-gradient(top, blue 0%, midnightblue 50%, black 99%) !important;
border: 1px solid rgb(31, 79, 112) !important;
border-radius: 5px 5px 5px 5px !important;
 
margin:19px;
}
in the EXTRA.css. Still trying to figure out opening in another window (not a coder by a LONG shot :ROFLMAO:).

Addendum:

Houston, we have liftoff! :D:LOL:
FINALLY got it to do what I wanted... using TMS. Here are the code edits required to conversation_postbit via TMS

Search
Code:
{$user.username}'}"><span class="conversationPostBitText">{xen:phrase start_conversation}</span></a>

Replace with
Code:
{$user.username}'}"onclick="window.open(this.href,'window','width=1000,height=800,resizable,scrollbars,location=0,status=0') ;return false;"><span class="conversationPostBitText">{xen:phrase start_conversation}</span></a>

and now you have it open in a separate smaller window.

Now, how to keep it from showing up on your own profile (which the template mod I hacked worked like that)... Time to clean the blood off the wall for another round.
I thought that replacing
Code:
<xen:if is="{$visitor.user_id}">
with
Code:
<xen:if is="{$visitor.user_id} AND {$user.user_id} != {$visitor.user_id}"
would work, since from what I understand it compares the visitors ID against the post ID and if they are not the same to continue with the processing - but TMS will not apply it with that code changed.
 
How would I go about removing the link on the users post when they are viewing? They don't want to start a convo with themselves :p

Also I see this in the main post

Adds a "Start a Conversation" link underneath the postbit (if you have permission to do so)

but one of my groups that can't start a personal convo yet, can see the start a convo link in the post bit, is that right?


Thanks
 
add to EXTRA.CSS this code for better effect:
Code:
.conversationPostBitText
{
background-color: #ac1212;
color: white;
border-radius: 2px;
margin-left: 5px;
padding: 1px 5px;
font-size: 10px; }


start a conversation.webp
 
  • Like
Reactions: IPF
Chris, is there a way to get this to open in a separate browser window. I had some code I had installed via TMS, but an add-on has stomped all over where it goes at and I cannot get either one to move. This would work great if it were possible. Also, can the text be styled (like replaced with CSS or a button)?

EDIT:

For the button, you can use CSS to style it. What I am using is
Code:
.conversationPostBitText
{
    color:white;
background: -webkit-linear-gradient(top, blue 0%, midnightblue 50%, black 99%) !important;
border: 1px solid rgb(31, 79, 112) !important;
border-radius: 5px 5px 5px 5px !important;
 
margin:19px;
}
in the EXTRA.css. Still trying to figure out opening in another window (not a coder by a LONG shot :ROFLMAO:).

Addendum:

Houston, we have liftoff! :D:LOL:
FINALLY got it to do what I wanted... using TMS. Here are the code edits required to conversation_postbit via TMS

Search
Code:
{$user.username}'}"><span class="conversationPostBitText">{xen:phrase start_conversation}</span></a>

Replace with
Code:
{$user.username}'}"onclick="window.open(this.href,'window','width=1000,height=800,resizable,scrollbars,location=0,status=0') ;return false;"><span class="conversationPostBitText">{xen:phrase start_conversation}</span></a>

and now you have it open in a separate smaller window.

Now, how to keep it from showing up on your own profile (which the template mod I hacked worked like that)... Time to clean the blood off the wall for another round.
I thought that replacing
Code:
<xen:if is="{$visitor.user_id}">
with
Code:
<xen:if is="{$visitor.user_id} AND {$user.user_id} != {$visitor.user_id}"
would work, since from what I understand it compares the visitors ID against the post ID and if they are not the same to continue with the processing - but TMS will not apply it with that code changed.

Perry,

Anyway to make the popup window open as an overlay instead?
 
Perry,

Anyway to make the popup window open as an overlay instead?
Tried several times to get an overlay to work and the only option we could get was popping up another window. I think Chris had already participated in a conversation about this and am sure if it could easily be done that the add-on would have that ability as Chris's coding would normally allow a feature like that if possible.
 
Managed to get overlay to work.

This is what i used in the postbit:
Code:
<a class="OverlayTrigger PopupItemLink" href="{xen:link conversations/add, '', 'to={$user.username}'}"><span class="conversationPostBitText">{xen:phrase start_conversation}</span></a>

In the "conversation_add" template,

1. added "<div class="formOverlay">" before the opening form tag and "/<div>" after the close of form tag

2. Replace the message editor with following as wysiwyg editor does not seem to work in overlay:

<textarea name="message" id="ctrl_message" rows="5" class="textCtrl Elastic"></textarea>


Only issue is after submitting the message, it redirects to the conversation module instead of staying in the same page :(
 
Only issue is after submitting the message, it redirects to the conversation module instead of staying in the same page :(
Yep, and that kind of defeats the whole purpose. The users that were asking about it didn't want to maneuver away from the forum page to do it, and the only solutions I could figure out (other than a pop-up in a new window) resulted in ending up at some point fully on the conversation page and out of the forum.
 
I had some success after hacking around the templates and codes.

1. I created a hidden field in the conversation_add template to store the current page url
PHP:
<input type="hidden" name="url" value="{$url}">

2. I modified the actionAdd function in the Conversation.php controller file to grab the current page url for storing into the hidden field above
PHP:
$paths = XenForo_Application::get('requestPaths');
$url = $paths['fullUri'];

The current page url variable needs to be passed to the conversation_add template:

PHP:
$viewParams = array(
'to' => $to,
'remaining' => $this->_getConversationModel()->allowedAdditionalConversationRecipients(array()),
'attachmentParams' => $attachmentParams,
'attachments' => $attachments,
'attachmentConstraints' => $this->getModelFromCache('XenForo_Model_Attachment')->getAttachmentConstraints(),
'url' => $url,
);
 
return $this->responseView('XenForo_ViewPublic_Conversation_Add', 'conversation_add', $viewParams);


3. I modified the actionInsert function in the Conversation.php controller file to grab the hidden url and redirect accordingly

PHP:
$input = $this->_input->filter(array(
'recipients' => XenForo_Input::STRING,
'title' => XenForo_Input::STRING,
'open_invite' => XenForo_Input::UINT,
'conversation_locked' => XenForo_Input::UINT,
'attachment_hash' => XenForo_Input::STRING,
'url' => XenForo_Input::STRING
));

PHP:
if (strpos($input['url'], 'conversations') !== false)  // retain the existing redirect link building if converstation starts the normal way
{
$input['url'] = XenForo_Link::buildPublicLink('conversations', $conversation);
};
return $this->responseRedirect(
XenForo_ControllerResponse_Redirect::SUCCESS,
$input['url'],
new XenForo_Phrase('your_conversation_has_been_created')
);

Now the overlay will redirect back to the same thread after adding the conversation, instead of redirecting to the conversation module.

One flaw is that it won't redirect to the anchor post which you started the conversation e.g. if you started the conversation on the 35th post in page 2, it will only redirect to start of page 2, still cracking of a way to store the post id into the hidden url

The above is definitely not elegant but it works for me
 
I had some success after hacking around the templates and codes.

Good Deal... way more than I want to get into it tho' as I do not like to directly modify the core files if I can keep from it (only for emergency bug fix).
 
Let me see if I have time to pick up MVC programming and convert this to an add-on.. might be more elegant to extend the existing post controller with an new Action to create conversation, which will also solve the issue of missing post id
 
Top Bottom