Post by ianhaney » Fri Mar 22, 2019 5:25 pm

I need to remove the word Menu that appears when on mobile view, I can't seem to find which file it's in to remove it, can anyone let me know where to find it please. I am using 2.0.3.1

Active Member

Posts

Joined
Sun Jun 24, 2012 2:30 am
Location - GB

Post by IP_CAM » Sat Mar 23, 2019 9:38 am

Well, you seem to use a Custom Theme, since this is not the case in a default OC v.2.0.3.1
Theme, because it originally displays the Fontawesome BAR Pic, by this Code, in the
header.tpl, Line 92:

Code: Select all

........  ...... <i class="fa fa-bars"></i></button> 
You could REPLACE <i class="fa fa-bars"></i> by a simple &nbsp; ,
to then just show an empty Button. (and keep it's height, by use of the &nbsp;
and as more exist, like &nbsp;&nbsp;&nbsp; , the 'wider' that button will be )
---
However, by use of this Mod below, one can change it, without removing Code from
a default header.tpl file physically. Technically, such might one day 'keep' another
Mod from doing it's job, if such a 'Line', or part of it, ever serves as Target/Anchor
in another Extension. Just to mention it, you never know ... 8)
data-target=".navbar-ex1-collapse"><i class="fa fa-bars"></i></button>

Good Luck! It at least might be of help, to find your way trough!
Ernie
---
Untested, I use no OC 2.0.x Version, just their nice Bootstrap-Themes ... :laugh:
menu_text_to_mobile_view_change.xml OC v.2.0.3.1 default Theme:
Configured to display an 'empty' Button:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id><![CDATA[Change Menu Text in Mobile Version 2.0.x]]></id>
<version><![CDATA[OC v.2.0.x]]></version>
<vqmver><![CDATA[2.5.1]]></vqmver>
<author><![CDATA[cyclops - IP_CAM]]></author>
	<file name="catalog/controller/common/header.php">
        <operation error="log">
            <search position="after" ><![CDATA[
			$data['text_all'] = $this->language->get('text_all'); 
			]]></search>
			<add><![CDATA[
			$data['text_menu'] = $this->language->get('text_menu');
			]]></add>
		</operation>
	</file>

	<file name="catalog/view/theme/*/template/common/header.tpl">
		<operation error="log">
			<search position="replace"><![CDATA[
			<button type="button" class="btn btn-navbar navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"><i class="fa fa-bars"></i></button> 
			]]></search>
			<add><![CDATA[
			<button type="button" class="btn btn-navbar navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"><?php echo $text_menu; ?></i></button>
			]]></add>
		</operation>
	</file>

	<file name="catalog/language/*/common/header.php">
		<operation error="log">
			<search position="after"><![CDATA[
			$_['text_all']           = 'Show All'; 
			]]></search>
			<add><![CDATA[
			$_['text_menu']           = '&nbsp;';
			]]></add>
		</operation>
	</file>
</modification>
PS. Such a VqMod can always easy be rewritten to OcMod, by
basically only changing:

Code: Select all

<id><![CDATA[ ....whatever......]]></id>
TO:

Code: Select all

<name><![CDATA[ ....whatever......]]>]]></name>
Replace:

Code: Select all

<vqmver><![CDATA[2.5.1]]></vqmver>
With:

Code: Select all

<code><![CDATA[change_menu_text_mobile_view]]></code>
Then change:

Code: Select all

file name=
TO:

Code: Select all

file path=
and:

Code: Select all

<search position="WHATEVER"  (+ what more might exist in this line)>
<add>
TO:

Code: Select all

<search>
<add position="WHATEVER"  (+ what more might exist in this line)>
and by renaming the ocmod - file to either

Code: Select all

install.xml
OR:

Code: Select all

menu_text_to_mobile_view_change.ocmod.xml
whatever works... ::)
---
Image

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by ianhaney » Tue Mar 26, 2019 11:33 pm

Sorry I managed to solve it in the end

Active Member

Posts

Joined
Sun Jun 24, 2012 2:30 am
Location - GB
Who is online

Users browsing this forum: Semrush [Bot] and 200 guests