Page 1 of 2

Feature Request (joomla 1.6)

Posted: 17 Jun 2011, 10:48
by daniel.boettner
Hello,

I tried the following myself but have to admit that joomla 1.6 component development is
pretty new to me. And I could not yet figure out how to add new fields to a backend view.

I would like to have the following features/informations in category view in frontend in ...
  • description
  • image
I was able to display the description pretty easy, same would be with an image.

Steps I took where

I edited in /components/com_phocadownload/views/category/tmpl/default.php around line 62

Code: Select all

		// - - - - -
		// CATEGORIES
		// - - - - -
		
		if (!empty($this->subcategories)) {	
			foreach ($this->subcategories as $valueSubCat) {
				
				echo '<div class="pd-subcategory">';
				echo '<a href="'. JRoute::_(PhocaDownloadHelperRoute::getCategoryRoute($valueSubCat->id, $valueSubCat->alias))
					 .'">'. $valueSubCat->title.'</a>';
				echo ' <small>('.$valueSubCat->numdoc.')</small>';
				if ($valueSubCat->description) echo '<div class="pd-cat-desc">'.$valueSubCat->description.'</div>';
				echo '</div>' . "\n";
				$subcategory = 1;
			}
			
			echo '<div class="phoca-dl-hr" style="clear:both">&nbsp;</div>';
		}
where I added a div with the description.

Also in /components/com_phocadownload/views/categorie/tmpl/default.php around line 37

Code: Select all

				$catOutput 	.= '<a href="'. JRoute::_(PhocaDownloadHelperRoute::getCategoryRoute($valueCat->id, $valueCat->alias))
							.'">'. $valueCat->title.'</a>';
				if ($valueSubCat->description) $catoutput  .= '<div class="pd-cat-desc">'.$valueSubCat->description.'</div>';
Where I also added the if clause for the description.

In /components/com_phocadownload/models/category.php on line 185 and 193 I edited

Code: Select all

cc.alias
to

Code: Select all

cc.alias, cc.description,
....

Not so hard so far ...

But I could not figure out how to add switches in the backend to decide if the description shall be displayed.
And same thing for an image.

The result should be that description and an category image can be entered/picked and swith the display via
simple radio buttons (desc. display: yes|no; image display: yes|no; image position: left|right).

I would really appreciate If you could help with this and think about adding this features to a future version.
Would also consider to pay for this features, may just tell me a price and I can consider if it is worth it

greetings.

Re: Feature Request (joomla 1.6)

Posted: 17 Jun 2011, 12:06
by SonRiab
Descriptions are shown if there are any! :shock: Check the options if you have enabled them!
And where do you want to display pictures? Do you have an image showing the idea/concept?

Re: Feature Request (joomla 1.6)

Posted: 20 Jun 2011, 06:44
by daniel.boettner
Its about displaying the description and image on categories list.
Will post a screenshot in about an hour.

But first will update to the most recent release of phoca download.

Re: Feature Request (joomla 1.6)

Posted: 20 Jun 2011, 08:45
by daniel.boettner
Image

This is my current display of my categories. Its just CSS no editing of the code itself.
Except the fact that I did add changes as described above.

I would also like to display a category picture above or below the category title.

Re: Feature Request (joomla 1.6)

Posted: 20 Jun 2011, 16:42
by SonRiab
Ok, now i got it! :lol:
Hmm, I take a deeper look at it this week! Maybe I can help you.

Kind regards

Rene

Re: Feature Request (joomla 1.6)

Posted: 22 Jun 2011, 09:20
by daniel.boettner
I would prefer a solution which can/will be integrated into future versions of the component itself.

Which would allow me to update, otherwise I would be stuck on the current version.

regards,

Daniel

Re: Feature Request (joomla 1.6)

Posted: 28 Jun 2011, 08:03
by daniel.boettner
anything new?

greetings,

Daniel

Re: Feature Request (joomla 1.6)

Posted: 29 Jun 2011, 14:24
by Jan
Hi, sorry I don't understand, this is included in the component, see:
https://www.phoca.cz/joomlademo/phoca-download

Re: Feature Request (joomla 1.6)

Posted: 05 Jul 2011, 10:41
by daniel.boettner
Uhhhhhmmmmmmmmmmmmmm :x

my fault *g*

simply just did not see the settings.

What I did not found yet is an option to display a description/preview description in the category list (not files) as shown above. As far as I see it displays the description inside a category. But I may would like to add a specific category picture and display it with the description in a list view.

If this is also included and I simply did not find it, it would be really nice if you could guide me to the right spot to configure this.

Re: Feature Request (joomla 1.6)

Posted: 11 Jul 2011, 13:45
by daniel.boettner
any information on this?

I looked again at the backend but I neither found an option to enable category description to be shown in categorie list nor to "attach" an image to a category.

I also looked at your link, and the 3 boxes at the top are kind of what I want, but I don't know how you did this.
I have category descriptions for some categorys but without "hacking" the code and adding "cc.desription" in the 'model'
and the object to the 'view' there will not be displayed a description in categories list.

I see there is a cell in the database for image, but it seems not be in use.

Can u guide me to a quick hack to get this functionality?

thanks