× Post about the main Gnosis Component here.

List display setup/appearance

  • bex-dk
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 3 months ago #4101 by bex-dk
List display setup/appearance was created by bex-dk
I would like to have a list version of my glossary that actually showed the images I've got in my definitions. As it is, images only show up when I click into an item. The things I am trying to explain are often easier demonstrated by a picture than words. I have a category list set up (category because I have one category for each language), but it shows me a long table format of the words and doesn't show any pictures. It doesn't show anything thatgives a person any reason to believe they can see pictures....

Is there a way to tweak this or could you add a plan in the future to create another type of display setup? I have figured out I could extend the number of characters shown so at least the list gives a better idea of what the definitions are. But I'd really like a list format that showed all the data that shows up in the individual word listing only in a category display. (For me everything is the word and the definition... i disabled display of everything else.

Please Log in or Create an account to join the conversation.

More
7 years 3 months ago #4104 by admin
Replied by admin on topic List display setup/appearance
If you don't mind implementing a hack you could try the following:

open the file joomlaroot/components/com_gnosis/views/category/tmpl/default.php

Find the following code near line 169:
$definitionstriped = substr(strip_tags($item->definition), 0, $this->params->get('glcwordsdefsize'));

Change it to this:
$definitionstriped = substr($item->definition, 0, $this->params->get('glcwordsdefsize'));

Basically we just removed the "strip_tags()" to prevent the image tags from being deleted. I may add an option in the future to choose to strip the tags from list views or not in the future.

Let me know if it works!
The following user(s) said Thank You: bex-dk

Please Log in or Create an account to join the conversation.

  • bex-dk
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 3 months ago - 7 years 3 months ago #4105 by bex-dk
Replied by bex-dk on topic List display setup/appearance
that worked perfectly! My site is publicly accessible (it is on a temporary subdomain until I consider it finished and replace the old one with it), so if you want to see the result, check out

ny.rrww.dk/index.php/da/gnosis

It will only be available at that link until I move it, but can for now give you an idea of the difference. The text is Danish so you won't be able to read it, but can see when the images show up. I've increased the size to 1000 so that it mostly shows the entire entry.
Last edit: 7 years 3 months ago by bex-dk. Reason: link didn't show without text

Please Log in or Create an account to join the conversation.

More
7 years 3 months ago - 7 years 3 months ago #4106 by admin
Replied by admin on topic List display setup/appearance
I'm glad it worked and wow: I like what you did with the website, and how it looks with images in listview. I'll definately have to add not stripping html tags as a option in the future.
Last edit: 7 years 3 months ago by admin.

Please Log in or Create an account to join the conversation.

  • bex-dk
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 3 months ago #4107 by bex-dk
Replied by bex-dk on topic List display setup/appearance
Thanks! It has definitely been a lot of working. And going from joomla 1.5 to joomla 3 has been a major change...

Gnosis has definitely saved me a lot of hassle with defining terms and linking to them (people don't always quite understand what they are trying to buy or why). I've got all of them linked off IDs now, so I am ready when I finally get around to translating the site. For now I am trying to get everything functional in one language, then I can think about translations.

Would it work in the pop-ups not to strip tags? Or could you consider in future development keeping pictures also for the plug-in portion if that might be possible. It would make more sense for people sometimes to have pictures and it is a little tricky to make them fully readable without other formatting (one had a list in it, so I had to strip the list formatting and number them manually as otherwise it all ran togehter confusingly).

It is a great help as it is, so just a thought to keep in mind for future development.

Please Log in or Create an account to join the conversation.

More
7 years 3 months ago #4108 by admin
Replied by admin on topic List display setup/appearance
I'm afraid that html in the tooltip would break it since it is a pure CSS solution. If anyone would like to make another tooltip plugin for gnosis it would be welcome. A javascript tooltip solution, for example, should be able to handle html and images. My javascript skills are weak, so haven't yet attempted it. Perhaps one day.

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds