Posts Tagged Article

Add and show attachments in Joomla Article

Step1: 
         download this extension from the joomla webiste link is:
         <a href="http://extensions.joomla.org/extensions/3115/details"> Attachment </a>
 
Step2: 
         Unzip this extension and read the "INSTALL.txt" to how to install or upgrade this attachment.
 
Step3:
        A).
 
       To show attachments for all users, change some setting from the admin,
        go to: 
               1).  admin-&gt;components-&gt;article attachment then click on "parameters" 
                     look for  "Who can see attachments?" select "Anyone"
 
       B).
 
       To show attachment while article listing.
        1).
           file name :		
			\components\com_content\views\category\view.html.php
            Line no:
			after 157
	    add
			1:	$dispatcher	=&amp; JDispatcher::getInstance();	
 
	   Line no:
			after 191		
	   add
			2:				
				JPluginHelper::importPlugin('content');
				$results = $dispatcher-&gt;trigger('onPrepareContent', array (&amp; $item, &amp; $item-&gt;params, 0));	
				$item-&gt;event-&gt;afterDisplayContent = trim(implode("\n", $results));
 
      2).
           file name : \components\com_content\views\category\tmpl\default_items.php
        	Line no:
			where ever u want to show attachment file link
 
		add
			echo $item-&gt;text;

,

2 Comments