Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#26 08-10-2015 07:27:55

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Two questions regarding mobile view.

I think you want to edit catshow.php.  In there you will need to add an if statement like:

Code:

if ($this->globals('core.mobile_display')) {
print '<div class="catshowdesc">' . $eol;
print $catdesc . $eol . $eol;
print '</div>' . $eol;
}

Nick Hendler

Offline

 

#27 08-29-2015 14:45:31

btwebmedia
Member
Registered: 08-25-2010
Posts: 150

Re: Two questions regarding mobile view.

I added the suggested code to catshow.php without any luck. The code is below. Where did I go wrong? Thanks.

<?php



$eol     = $this->globals('core.eol');

$catshow = $this->globals('ecom.cat_catshow');



$random  = 'x' . $this->random_key(8);



$catname = $this->xhtml_encode($catshow['name']);



// +--

// | Check the images.

// +--



$images = $this->check_images(array('category' => array('root' => 'PUBLIC', 'dir' => 'media/ecom/cat', 'list' => $catshow['catimg'])));



// +--

// | Handle the description based on whether it has

// | XHTML tags in it or not.

// +--



$has_tags = $this->has_tags($catshow['description']);



if (!(empty($has_tags))) {



     $catdesc  = $catshow['description'];



} else {



     $catdesc  = '<p>' . $this->xhtml_encode($catshow['description']) . '</p>';



} // End of if statement.



// +--

// | Create the image tag.

// +--



$imgtag   = '';

$imgwidth = 0;



if (!(empty($images['category']))) {



     $imglist = $this->make_list($images['category']);

     $imgname = $imglist[0];



     $imgwidth = $this->globals('core_settings.ecom.imgsizecat');

     $imgurl   = 'media/ecom/cat/' . $imgname;



     $imgtag   = '<img src="' . $imgurl . '" ';

     if ($imgwidth) {$imgtag .= 'width="' . $imgwidth . '" ';}

     $imgtag  .= 'alt="' . $catname . '" />';



} // End of if statement.



// +--

// | Print the display for this category.

// +--



print '<div class="ecom_catshow">' . $eol;



print '<table class="invisible"><tr><td class="invisible" style="';



if (!(empty($imgtag))) {print 'width: ' . $imgwidth . 'px; ';}



print 'padding: 0px 10px 10px 0px;">' . $eol . $eol;



if (!(empty($imgtag))) {



     print $imgtag . $eol . $eol;



     print '</td><td class="invisible" style="padding: 0px 10px 0px 0px;">' . $eol . $eol;



}

if ($this->globals('core.mobile_display')) {
print '<div class="catshowdesc">' . $eol;
print $catdesc . $eol . $eol;
print '</div>' . $eol;
}


// End of if statement.



print '<div class="catshowdesc">' . $eol;

print $catdesc . $eol . $eol;

print '</div>' . $eol;



print '</td></tr></table>' . $eol . $eol;



print '</div>' . $eol . $eol;



?>

Offline

 

#28 08-31-2015 08:11:57

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Two questions regarding mobile view.

You would need to remove this:

Code:

print '<div class="catshowdesc">' . $eol;

print $catdesc . $eol . $eol;

print '</div>' . $eol;

Nick Hendler

Offline

 

#29 08-31-2015 10:45:31

btwebmedia
Member
Registered: 08-25-2010
Posts: 150

Re: Two questions regarding mobile view.

Hello: I tried the suggested steps without success. Link to site is "www.hahntactical.com". Thanks.

Offline

 

#30 09-01-2015 09:03:18

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Two questions regarding mobile view.

I am accessing your site using the  mobile skin at:

http://hahntactical.com/index.php?app=e … hts-Optics

I see a category description.  I then switch to the desktop version and access the same page and see no category description.  It's working as you asked for it to work.  I'm looking at the top box with optic in it, no description next to it on desktop, description shows on mobile.


Nick Hendler

Offline

 

#31 09-01-2015 09:52:33

btwebmedia
Member
Registered: 08-25-2010
Posts: 150

Re: Two questions regarding mobile view.

Hello Nick:

Thanks for responding. I believe my code modifications are backwards. I wanted the category description to be removed from the "mobile" version, but I would like for the descriptions to be visible on the desktop version. How would the IF STATEMENT need to be modified? Thanks.

if ($this->globals('core.mobile_display')) {
print '<div class="catshowdesc">' . $eol;
print $catdesc . $eol . $eol;
print '</div>' . $eol;
}

Offline

 

#32 09-01-2015 09:56:37

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Two questions regarding mobile view.

if (!$this->globals('core.mobile_display')) {

Notice the exclamation mark in front of the global variable name.  That means NOT.


Nick Hendler

Offline

 

#33 09-01-2015 10:03:30

btwebmedia
Member
Registered: 08-25-2010
Posts: 150

Re: Two questions regarding mobile view.

Thanks Nick. I was trying to get the same modification to work, but I was putting the NOT code in wrong part of the code. Nevertheless your modification is working according to my request. Thanks for your help.

Offline

 

#34 09-01-2015 10:22:07

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Two questions regarding mobile view.

No worries.


Nick Hendler

Offline

 

Board footer