Use joomla content plugins in GJ wall posts...

11 years 3 months ago #220338 by activha
We absolutely need to preview pdfs somewhere in Groupjive.

Can this be in the photo tab ? with special adaptation ?
Could it be a new plugin ?
If we integrate pdf thanks to the editor somewhere will it display ?

Please Log in to join the conversation.

11 years 3 months ago #220339 by krileon
You can do whatever you want, it's open source. There is no such feature implemented though nor is it planned. I suppose the easiest approach is to edit the File integration and implement an if statement to the download to URL to just link to the PDF file directly instead of sending a download header.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

11 years 3 months ago - 11 years 3 months ago #220340 by activha
Could you help me locate what would be needed to be changed ?

You mean the public function getDownloadUrl in cbgroupjivefile.php ?

We just need a way to link to the pdf that's all but I have no idea of how to do it.

I tried to change it as is for line 391, it is working but no very well, do you have any idea to better it ?
if ( $row->get( 'file' ) ) {
	$return			.=					'<div class="gjContentBoxRow">'
					.						'<input type="button" value="' . htmlspecialchars( CBTxt::Th( 'Download' ) ) . '" class="gjButton btn btn-success" onclick="' . $row->getDownloadUrl( true ) . '" />'
					.					'</div>'
					
					.					'<div class="gjContentBoxRow">'
					.						'<iframe src="http://docs.google.com/gview?url=' . $row->getFilePath( false ) . '&embedded=true" style="width:100%; height:250px;" frameborder="0" class="edocs_iframe"></iframe>'
				
					.					'</div>';
					
					
					
					;
}

Please Log in to join the conversation.

11 years 3 months ago #220355 by zaratustra27
Replied by zaratustra27 on topic Use joomla content plugins in GJ wall posts...
I changed line 463 of [site]/components/com_comprofiler/plugin/user/plug_cbgroupjive/plugins/cbgroupjivewall/cbgroupjivewall.php by adding the following line:

JHTML::_('content.prepare',$row->getPost())

This function runs again content plugins against the string input as second var. Pls check details about the function and my GJ version in my previous posts.

I hope it helps, send me an email if you want me to send you the file I modified, it has a lot of commented scripts I tried but discarded and didn't bother to clean but can give you an idea.

I can't do more, good luck!

BTW, I can't attach files in the posts, otherwise I shared it directly. Pls admin check.

Please Log in to join the conversation.

11 years 3 months ago - 11 years 3 months ago #220380 by krileon

Could you help me locate what would be needed to be changed ?

You mean the public function getDownloadUrl in cbgroupjivefile.php ?

We just need a way to link to the pdf that's all but I have no idea of how to do it.

I tried to change it as is for line 391, it is working but no very well, do you have any idea to better it ?

No, I can not help you with core edits. Yes, you will need to adjust getDownloadUrl. You'd need to add an IF statement to it to check if its extension is PDF and if it is just link directly to the file instead of the download page of that file.

I changed line 463 of [site]/components/com_comprofiler/plugin/user/plug_cbgroupjive/plugins/cbgroupjivewall/cbgroupjivewall.php by adding the following line:

JHTML::_('content.prepare',$row->getPost())

This function runs again content plugins against the string input as second var. Pls check details about the function and my GJ version in my previous posts.

I hope it helps, send me an email if you want me to send you the file I modified, it has a lot of commented scripts I tried but discarded and didn't bother to clean but can give you an idea.

I can't do more, good luck!

BTW, I can't attach files in the posts, otherwise I shared it directly. Pls admin check.

GJ 2.7rc1 and rc2 already parse Joomla content plugins (enable from backend) so your core changes are not needed, simply update. What he's wanting to do is change the behavior of the file integration; no idea why he posted in your topic though.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.843 seconds

Facebook Twitter LinkedIn