Badges News Show Pro GK4

Free responsive Joomla 2.5 and 3.x module to present your content with easy and intuitive way.
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Sat May 11, 2013 10:06 am
Dear Mate...

Good day :)

Please to help me to use badges in News Show Pro GK4, i'll use with badges from this badges .

thanks in advance Mate...
User avatar
Junior Boarder

teitbite
Mon May 13, 2013 8:40 am
Hi

NSP do not support badges. Badges are being attached to a module position in our templates. If You would like to use the one from this module than You will need to create couple of new module suffixes and attach css classes which will add badges to it. Unfortunately I cannot help You with this, because it's considered as a customization and we do not support that.
User avatar
Moderator

GK User
Mon May 13, 2013 8:46 am
oh ok thank you Teitbite.
User avatar
Junior Boarder

teitbite
Mon May 13, 2013 10:31 am
Hi

I can tell You an example "how to" if You show me Your site, but will not be able to make it for You.
User avatar
Moderator

GK User
Mon May 13, 2013 10:39 am
Hi

Nice to hear :) thank u, it's my web
User avatar
Junior Boarder

teitbite
Tue May 14, 2013 3:10 pm
Hi

I cannot open Your site. Circle is spinning and nothing appears. I'll try a little bit later. Please start from adding this to /html/modules.php

Code: Select all
<span class="badge"></span>


if You will have problem with it please paste the code of this file here.
User avatar
Moderator

GK User
Wed May 15, 2013 5:42 am
Hi

So sorry about my web cannot open on your country.

i has trial to put the code <span class="badge"></span> in /html/modules.php but nothing appear the badge.

The script is :

$GLOBALS['badges_in_use']=true;
echo '<div style="display:none;" id="'.$news_id.'_bvmpb_mod" class="product_badge"></div>';

where can i put the script ? thanks in advance ...

teitbite wrote:Hi

I cannot open Your site. Circle is spinning and nothing appears. I'll try a little bit later. Please start from adding this to /html/modules.php

Code: Select all
<span class="badge"></span>


if You will have problem with it please paste the code of this file here.
User avatar
Junior Boarder

teitbite
Wed May 15, 2013 6:09 pm
Hi

Sorry, I do not know what this code does:

Code: Select all
$GLOBALS['badges_in_use']=true;
echo '<div style="display:none;" id="'.$news_id.'_bvmpb_mod" class="product_badge"></div>';


It's really hard to help with this without seeing the site, but I have told You wrong already, becuase I was trying to tell You how to add badges for modules while You need it for NSP products. Unfortunately I cannot see a way You can specifie the badge inside product, since NSP is showing products only with standard data. Have You solved this problem already ?
User avatar
Moderator

GK User
Thu May 16, 2013 3:56 am
Hi

i use the bikestore template J2.5. Until now still not yet solved this problem. i'll trying againt put the code as You tell to me, and let You know if solved.


teitbite wrote:Hi

Sorry, I do not know what this code does:

Code: Select all
$GLOBALS['badges_in_use']=true;
echo '<div style="display:none;" id="'.$news_id.'_bvmpb_mod" class="product_badge"></div>';


It's really hard to help with this without seeing the site, but I have told You wrong already, becuase I was trying to tell You how to add badges for modules while You need it for NSP products. Unfortunately I cannot see a way You can specifie the badge inside product, since NSP is showing products only with standard data. Have You solved this problem already ?
User avatar
Junior Boarder

teitbite
Fri May 17, 2013 10:20 am
Hi

We clearly do not understand each other :) Please send me an access to ftp and I'll make it for You.
User avatar
Moderator

GK User
Fri May 17, 2013 10:48 am
Hi

thanks for help :)
i had PM You an access to ftp. once thanks Teitbite :)

teitbite wrote:Hi

We clearly do not understand each other :) Please send me an access to ftp and I'll make it for You.
User avatar
Junior Boarder

teitbite
Fri May 17, 2013 12:28 pm
Hi

I see nothing in my PM, You should try to send it again or use my email address.
User avatar
Moderator

GK User
Fri May 17, 2013 12:35 pm
Hi

Sorry, i mean, i have sent by email an access to ftp, with the link of topic.

teitbite wrote:Hi

I see nothing in my PM, You should try to send it again or use my email address.
User avatar
Junior Boarder

teitbite
Sun May 19, 2013 9:11 am
Hi

I do not see an user in this mail. Can You please tell me the correct one ?
User avatar
Moderator

GK User
Mon May 20, 2013 4:09 am
Hi

I email to your email [email protected], with Subject Badges News Show Pro GK4 with link topic, perhaps in Your mail spam folder, i sent on Friday, May 17... Sorry if my english not good enough Teitbite. Please let me know if You have received or may i add your Skype?


teitbite wrote:Hi

I do not see an user in this mail. Can You please tell me the correct one ?
User avatar
Junior Boarder

teitbite
Mon May 20, 2013 10:20 am
Hi

No no. I did received the mail, but I only got an url to cpanel and a password. I do not see an username to access this cpanel. Can You please send me this username ?
User avatar
Moderator

GK User
Mon May 20, 2013 10:32 am
ooh so sorry :( i have resend by email my ftp username to your email. Thanks in advance Teitbite.

teitbite wrote:Hi

No no. I did received the mail, but I only got an url to cpanel and a password. I do not see an username to access this cpanel. Can You please send me this username ?
User avatar
Junior Boarder

teitbite
Mon May 20, 2013 10:58 am
Hi

Now it's ok, but I realised that badger will be required per article not per module, so please let me know if You are using regular joomla articles or K2. So I'll know which function to work with.
User avatar
Moderator

GK User
Mon May 20, 2013 11:09 am
Hi

I want to use K2 and Virtuemart.

teitbite wrote:Hi

Now it's ok, but I realised that badger will be required per article not per module, so please let me know if You are using regular joomla articles or K2. So I'll know which function to work with.
User avatar
Junior Boarder

teitbite
Mon May 20, 2013 11:24 am
Hi

Ok. I've made an example on K2 header function. You will just need to add the same to VM header function in the same file which is: /modules/mod_news_pro_gk4/tmpl/layout.parts.php

this is an orginal code:

Code: Select all
   // header generator
   function header_k2($config, $news_id, $news_alias, $news_cat_id, $news_cat_alias, $news_title) {
      //
      require_once (JPATH_SITE.DS.'components'.DS.'com_k2'.DS.'helpers'.DS.'route.php');
      //
      if($config['news_content_header_pos'] != 'disabled') {
         $class = ' t'.$config['news_content_header_pos'].' f'.$config['news_content_header_float'];
         $title = NSP_GK4_Utils::cutText(htmlspecialchars($news_title), $config['title_limit'], $config['title_limit_type'], '&hellip;');
            $title = str_replace('"', "&quot;", $title);
         $link = urldecode(JRoute::_(K2HelperRoute::getItemRoute($news_id.':'.urlencode($news_alias), $news_cat_id.':'.urlencode($news_cat_alias))));
         //
         if($config['news_header_link'] == 1)
            return '<h4 class="nspHeader'.$class.'"><a href="'.$link.'" title="'.htmlspecialchars(str_replace('"', '', $news_title)).'">'.$title.'</a></h4>';   
         else
            return '<h4 class="nspHeader'.$class.'" title="'.htmlspecialchars(str_replace('"', '', $news_title)).'">'.$title.'</h4>';
      } else
         return '';      
   }


and here is after my modifications

Code: Select all
   // header generator
   function header_k2($config, $news_id, $news_alias, $news_cat_id, $news_cat_alias, $news_title) {
      //
      $badge = '<div class="badge badge'.$news_id.'"></div>';
      require_once (JPATH_SITE.DS.'components'.DS.'com_k2'.DS.'helpers'.DS.'route.php');
      //
      if($config['news_content_header_pos'] != 'disabled') {
         $class = ' t'.$config['news_content_header_pos'].' f'.$config['news_content_header_float'];
         $title = NSP_GK4_Utils::cutText(htmlspecialchars($news_title), $config['title_limit'], $config['title_limit_type'], '&hellip;');
            $title = str_replace('"', "&quot;", $title);
         $link = urldecode(JRoute::_(K2HelperRoute::getItemRoute($news_id.':'.urlencode($news_alias), $news_cat_id.':'.urlencode($news_cat_alias))));
         //
         if($config['news_header_link'] == 1)
            return $badge.'<h4 class="nspHeader'.$class.'"><a href="'.$link.'" title="'.htmlspecialchars(str_replace('"', '', $news_title)).'">'.$title.'</a></h4>';   
         else
            return $badge.'<h4 class="nspHeader'.$class.'" title="'.htmlspecialchars(str_replace('"', '', $news_title)).'">'.$title.'</h4>';
      } else
         return $badge.'';      
   }


as You can see $badge appeared couple of times. Now You need to add a badge with css using article id as selector. For example:

Code: Select all
.badge101 {
background: url(path_to_image) no-repeat 0 0 transparent.
}


When You set this please show me a result so I'll tell You one small fix for this badge to show over the article.
User avatar
Moderator

GK User
Mon May 20, 2013 11:28 am
Hi

ok Thanks a lot Teitbite :)
i'll make it first and let you know.

teitbite wrote:Hi

Ok. I've made an example on K2 header function. You will just need to add the same to VM header function in the same file which is: /modules/mod_news_pro_gk4/tmpl/layout.parts.php

this is an orginal code:

Code: Select all
   // header generator
   function header_k2($config, $news_id, $news_alias, $news_cat_id, $news_cat_alias, $news_title) {
      //
      require_once (JPATH_SITE.DS.'components'.DS.'com_k2'.DS.'helpers'.DS.'route.php');
      //
      if($config['news_content_header_pos'] != 'disabled') {
         $class = ' t'.$config['news_content_header_pos'].' f'.$config['news_content_header_float'];
         $title = NSP_GK4_Utils::cutText(htmlspecialchars($news_title), $config['title_limit'], $config['title_limit_type'], '&hellip;');
            $title = str_replace('"', "&quot;", $title);
         $link = urldecode(JRoute::_(K2HelperRoute::getItemRoute($news_id.':'.urlencode($news_alias), $news_cat_id.':'.urlencode($news_cat_alias))));
         //
         if($config['news_header_link'] == 1)
            return '<h4 class="nspHeader'.$class.'"><a href="'.$link.'" title="'.htmlspecialchars(str_replace('"', '', $news_title)).'">'.$title.'</a></h4>';   
         else
            return '<h4 class="nspHeader'.$class.'" title="'.htmlspecialchars(str_replace('"', '', $news_title)).'">'.$title.'</h4>';
      } else
         return '';      
   }


and here is after my modifications

Code: Select all
   // header generator
   function header_k2($config, $news_id, $news_alias, $news_cat_id, $news_cat_alias, $news_title) {
      //
      $badge = '<div class="badge badge'.$news_id.'"></div>';
      require_once (JPATH_SITE.DS.'components'.DS.'com_k2'.DS.'helpers'.DS.'route.php');
      //
      if($config['news_content_header_pos'] != 'disabled') {
         $class = ' t'.$config['news_content_header_pos'].' f'.$config['news_content_header_float'];
         $title = NSP_GK4_Utils::cutText(htmlspecialchars($news_title), $config['title_limit'], $config['title_limit_type'], '&hellip;');
            $title = str_replace('"', "&quot;", $title);
         $link = urldecode(JRoute::_(K2HelperRoute::getItemRoute($news_id.':'.urlencode($news_alias), $news_cat_id.':'.urlencode($news_cat_alias))));
         //
         if($config['news_header_link'] == 1)
            return $badge.'<h4 class="nspHeader'.$class.'"><a href="'.$link.'" title="'.htmlspecialchars(str_replace('"', '', $news_title)).'">'.$title.'</a></h4>';   
         else
            return $badge.'<h4 class="nspHeader'.$class.'" title="'.htmlspecialchars(str_replace('"', '', $news_title)).'">'.$title.'</h4>';
      } else
         return $badge.'';      
   }


as You can see $badge appeared couple of times. Now You need to add a badge with css using article id as selector. For example:

Code: Select all
.badge101 {
background: url(path_to_image) no-repeat 0 0 transparent.
}


When You set this please show me a result so I'll tell You one small fix for this badge to show over the article.
User avatar
Junior Boarder

GK User
Tue May 21, 2013 3:42 am
Hi

1. I have seen your modifications on K2 header function.
2. I have added the three product in K2 items.
3. and has also been added in override.css :

Code: Select all
.badge115 {
background: url(path_to_image) no-repeat 0 0 transparent.
}

.badge116 {
background: url(path_to_image) no-repeat 0 0 transparent.
}

.badge117 {
background: url(path_to_image) no-repeat 0 0 transparent.
}



please tell me one small fix for this badge. Thanks in advance.




arthur2012 wrote:Hi

ok Thanks a lot Teitbite :)
i'll make it first and let you know.

teitbite wrote:Hi

Ok. I've made an example on K2 header function. You will just need to add the same to VM header function in the same file which is: /modules/mod_news_pro_gk4/tmpl/layout.parts.php

this is an orginal code:

Code: Select all
   // header generator
   function header_k2($config, $news_id, $news_alias, $news_cat_id, $news_cat_alias, $news_title) {
      //
      require_once (JPATH_SITE.DS.'components'.DS.'com_k2'.DS.'helpers'.DS.'route.php');
      //
      if($config['news_content_header_pos'] != 'disabled') {
         $class = ' t'.$config['news_content_header_pos'].' f'.$config['news_content_header_float'];
         $title = NSP_GK4_Utils::cutText(htmlspecialchars($news_title), $config['title_limit'], $config['title_limit_type'], '&hellip;');
            $title = str_replace('"', "&quot;", $title);
         $link = urldecode(JRoute::_(K2HelperRoute::getItemRoute($news_id.':'.urlencode($news_alias), $news_cat_id.':'.urlencode($news_cat_alias))));
         //
         if($config['news_header_link'] == 1)
            return '<h4 class="nspHeader'.$class.'"><a href="'.$link.'" title="'.htmlspecialchars(str_replace('"', '', $news_title)).'">'.$title.'</a></h4>';   
         else
            return '<h4 class="nspHeader'.$class.'" title="'.htmlspecialchars(str_replace('"', '', $news_title)).'">'.$title.'</h4>';
      } else
         return '';      
   }


and here is after my modifications

Code: Select all
   // header generator
   function header_k2($config, $news_id, $news_alias, $news_cat_id, $news_cat_alias, $news_title) {
      //
      $badge = '<div class="badge badge'.$news_id.'"></div>';
      require_once (JPATH_SITE.DS.'components'.DS.'com_k2'.DS.'helpers'.DS.'route.php');
      //
      if($config['news_content_header_pos'] != 'disabled') {
         $class = ' t'.$config['news_content_header_pos'].' f'.$config['news_content_header_float'];
         $title = NSP_GK4_Utils::cutText(htmlspecialchars($news_title), $config['title_limit'], $config['title_limit_type'], '&hellip;');
            $title = str_replace('"', "&quot;", $title);
         $link = urldecode(JRoute::_(K2HelperRoute::getItemRoute($news_id.':'.urlencode($news_alias), $news_cat_id.':'.urlencode($news_cat_alias))));
         //
         if($config['news_header_link'] == 1)
            return $badge.'<h4 class="nspHeader'.$class.'"><a href="'.$link.'" title="'.htmlspecialchars(str_replace('"', '', $news_title)).'">'.$title.'</a></h4>';   
         else
            return $badge.'<h4 class="nspHeader'.$class.'" title="'.htmlspecialchars(str_replace('"', '', $news_title)).'">'.$title.'</h4>';
      } else
         return $badge.'';      
   }


as You can see $badge appeared couple of times. Now You need to add a badge with css using article id as selector. For example:

Code: Select all
.badge101 {
background: url(path_to_image) no-repeat 0 0 transparent.
}


When You set this please show me a result so I'll tell You one small fix for this badge to show over the article.
User avatar
Junior Boarder

teitbite
Tue May 21, 2013 3:44 pm
Hi

Once again I cannot see Your site to tell the rest of the code, so I'll try guess. But before that please replace "path_to_image" in the code You have copied to the path of badge image.

Here is the code:

Code: Select all
.nspArt {
position: relative;
}

.badge {
position: absolute;
top: 0;
right: 0;
height: {height_of_badge}px;
weight: {weight_of_badge}px;
}
User avatar
Moderator

GK User
Wed May 22, 2013 12:26 pm
Hi

i have tried to replace "path_to_image" with the path of the image and put the css code on override.css with replace "height_of_badge" and "width_of_badge", but the badge still not appear Teitbite :)

teitbite wrote:Hi

Once again I cannot see Your site to tell the rest of the code, so I'll try guess. But before that please replace "path_to_image" in the code You have copied to the path of badge image.

Here is the code:

Code: Select all
.nspArt {
position: relative;
}

.badge {
position: absolute;
top: 0;
right: 0;
height: {height_of_badge}px;
weight: {weight_of_badge}px;
}
User avatar
Junior Boarder

teitbite
Wed May 22, 2013 10:30 pm
Hi

Please paste the code You have right now in override.css and check if override is activated in template settings.
User avatar
Moderator

GK User
Thu May 23, 2013 6:38 am
Hi

badge has appeared very well, thanks a lot Teitbite :)

teitbite wrote:Hi

Please paste the code You have right now in override.css and check if override is activated in template settings.
User avatar
Junior Boarder

teitbite
Fri May 24, 2013 9:53 am
Hi

No problem. I'm glad it's working. Sorry it took so long, but site is still not openning to me so I had to guess how to make it.
User avatar
Moderator


cron