collapse

* User Info

 
 
Welcome, Guest. Please login or register.

* Recent Posts

Forum closed by whazzup
[September 25, 2021, 02:56:14 PM]


How do i replace an image file with another image file by Malu
[December 16, 2020, 03:17:02 PM]


Can't get RSG "Show My Galleries" to work by Dampfnudel
[February 25, 2019, 11:01:55 AM]


Change the order of uploaded images in the gallery by whazzup
[February 19, 2019, 10:37:29 PM]


Upload timeout for large galleries (500 images each) by whazzup
[February 11, 2019, 10:07:25 PM]


Greetings from Ronald Smit by whazzup
[January 06, 2019, 03:39:22 PM]


Pluign and module by whazzup
[June 08, 2018, 11:57:13 PM]


Version 4.4.1 released by whazzup
[May 31, 2018, 04:31:16 PM]

Author Topic: Hide the label Description, only the description content itself below image  (Read 3098 times)

Offline Malu

  • Newbie
  • *
  • Posts: 31
Hello,

Per item / image I add some information in the Description.
Where can I indicate that I want to hide the label Description?

Many thanks in advance!

Offline mirjam

  • Retired from Dev Team
  • Hero Member
  • ****
  • Posts: 670
So you want to show the descripton on a page like this demopage: http://demo.rsgallery2.nl/index.php/demo-rsgallery2/3-a-subgallery/27-1545496 but you don't want to show the text "Description" in the tab? And I assume you've turned of the other tabs (voting/comments/exif)?

If you just want to show the description and no other texts you could change the template:
- Find the file /JOOMLAROOT/components/com_rsgallery2/templates/semantic/display.class.php
- Find the function showDisplayImageDetails on line 328-375 and add a few comment signs:
Code: [Select]
function showDisplayImageDetails() {
global $rsgConfig;

$gallery = rsgGalleryManager::get();

// if no details need to be displayed then exit

if (! ( $rsgConfig->get("displayDesc") || $rsgConfig->get("displayVoting") || $rsgConfig->get("displayComments") || $rsgConfig->get("displayEXIF") ))
return;

// JHtmlTabs
/* $options = array(
'onActive' => 'function(title, description){
description.setStyle("display", "block");
title.addClass("open").removeClass("closed");
}',
'onBackground' => 'function(title, description){
description.setStyle("display", "none");
title.addClass("closed").removeClass("open");
}',
'startOffset' => 0,  // 0 starts on the first tab, 1 starts the second, etc...
'useCookie' => true, // this must not be a string. Don't use quotes.
);
echo JHtml::_('tabs.start', 'page_inline_tabs', $options);

if ( $rsgConfig->get("displayDesc") ) {
echo JHtml::_('tabs.panel', JText::_('COM_RSGALLERY2_DESCRIPTION'), 'page_inline_tabs_description');
*/ $this->_showDescription();
/* }

if ( $rsgConfig->get("displayVoting") ) {
echo JHtml::_('tabs.panel', JText::_('COM_RSGALLERY2_VOTING'), 'page_inline_tabs_voting');
$this->_showVotes();
}

if ( $rsgConfig->get("displayComments") ) {
echo JHtml::_('tabs.panel', JText::_('COM_RSGALLERY2_COMMENTS'), 'page_inline_tabs_comments');
$this->_showComments();
}

if ($rsgConfig->get("displayEXIF") ) {
echo JHtml::_('tabs.panel', JText::_('COM_RSGALLERY2_EXIF'), 'page_inline_tabs_exif');
$this->_showEXIF();
}

echo JHtml::_('tabs.end');
*/
}

The description tab and the other tabs are created using JHtmlTabs, with these comment block signs ((/* ... */) in place these tabs won't be created.

One question comes to mind: if you want to change the text "Description" you can do so in the language file, that might be an option for you as well depending on the reason why you want to remove the text.
With a little boy in the house I don't spend as much time on RSG2 anymore.

I still like RSG2, if you do too, please think about how you can invest some of your time in RSG2... the one remaining coding volunteer (Whazzup) can use your help!

Offline Malu

  • Newbie
  • *
  • Posts: 31
Actually, the example you refer to is not what I would like. I have hidden the voting, comments and EXIF options by the way. So below the image I would like to show only the content of the description without the header/word Description/Omschrijving itself.
If that is not possible, I would like to change the color of that header. Therefor I will now look into your answer to my question about the CSS and HTML view missing.

Thank you for your response,

Offline mirjam

  • Retired from Dev Team
  • Hero Member
  • ****
  • Posts: 670
It seems that I don't understand what you want to achieve. The code example is for the changes that you can see in the attached image: on the left the original code result, on the right the result with the changes.

If this is not what you want, as you say, perhaps an edited image of what you want to achieve would be helpfull?

If you want to change the color of that header I can recommend the addon Firebug (for Mozilla Firefox) to see which class you can/should change. It's also usefull to test changes before applying them to the file itself.

For example, I can create a red background for the Description label by adding the line "background-color: #FF0000;" to the CSS style of ".rsg2 dl.tabs dt.open" that is found in the file template.css in the /semantic/css/ directory of the RSG2 template.
« Last Edit: October 10, 2012, 01:42:08 PM by mirjam »
With a little boy in the house I don't spend as much time on RSG2 anymore.

I still like RSG2, if you do too, please think about how you can invest some of your time in RSG2... the one remaining coding volunteer (Whazzup) can use your help!

Offline Malu

  • Newbie
  • *
  • Posts: 31
Hello Mirjam,

The image on the right is exactly what I want to achieve.
So if I understand your first answer correctly:
"with these comment block signs ((/* ... */) in place these tabs won't be created."

I have to wait till I can access the CSS and or HTML files.
Next, I change ((/*Description*/) into ((/* ... */)
and then I will have the result that Description text! is shown beneath the image,
without the tab/label Description itself.

Is this correct?
Many thanks for your help!

Offline mirjam

  • Retired from Dev Team
  • Hero Member
  • ****
  • Posts: 670
The edit CSS and edit HTML button that you have problems with (that's a different thread) won't do this because the file that you need to change is not in the list of files that you can change with these buttons.

So you need to access the files on your sever via FTP to change things. Copy the original file, as mentioned above, to save it as a "backup", then download the file, apply the changes as mentioned with for example Notepadd++ (or your favorite editor), upload the changed file and enjoy.

Make sure you either note down exactly what you change for future reference, or create your own template as described here: http://www.rsgallery2.nl/display_and_templates/how_create_your_own_template_or_modify_semantic_template_16758.0.html (users say it sounds more difficult than it is). Reason: if you ever update RSGallery2 your changes to the template Semantic will be overwritten. If you have your own template it won't be touched during an update.

With a little boy in the house I don't spend as much time on RSG2 anymore.

I still like RSG2, if you do too, please think about how you can invest some of your time in RSG2... the one remaining coding volunteer (Whazzup) can use your help!

Offline Malu

  • Newbie
  • *
  • Posts: 31
Thanks again! I managed, with your clear instructions, to hide the tab/label Description.