OS Property support center

Remove Featured and Total Viewing

  • Patrik
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 7 months ago - 11 years 7 months ago #19816 by Patrik
Remove Featured and Total Viewing was created by Patrik
Hi,

I want to remove Featrured (OS_FEATURED) and Total View (TOTAL_VIEWING) from the property details site.
Where can I do this?

Patrik
Last edit: 11 years 7 months ago by Patrik.

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

More
11 years 7 months ago #19828 by Sky
Replied by Sky on topic Re: Remove Featured and Total Viewing
...\components\com_osproperty\classes\listing.html.php
find around 900 line... With this deleted/ commented, You will lose Featured view...
<tr>
<td class="left_details_col">
<?php echo JText::_('OS_FEATURED')?>
</td>
<td class="right_details_col">
<?php
if($row->isFeatured == 1){
echo JText::_('OS_YES');
}else{
echo JText::_('OS_NO');
}
?>
</td>
</tr>


And around 1000 line, same file, deleting or commenting this code, you will lose total viewing.

<tr>
<td class="left_details_col">
<?php echo JText::_('OS_TOTAL_VIEWING')?>
</td>
<td class="right_details_col">
<b><?php echo $row->hits;?></b>
</td>
</tr>


I am saying around that, maybe +/- 5 lines, since i was editing something myself, so not sure exact line.
Be sure to make backup always.
The following user(s) said Thank You: Patrik

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

  • Patrik
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 7 months ago #19829 by Patrik
Replied by Patrik on topic Re: Remove Featured and Total Viewing
Hi Sky,

I have removed exactly the lines
<tr>
<td class="left_details_col">
<?php echo JText::_('OS_FEATURED')?>
</td>
<td class="right_details_col">
<?php
if($row->isFeatured == 1){
echo JText::_('OS_YES');
}else{
echo JText::_('OS_NO');
}
?>
</td>
</tr>



and

<tr>
<td class="left_details_col">
<?php echo JText::_('OS_TOTAL_VIEWING')?>
</td>
<td class="right_details_col">
<b><?php echo $row->hits;?></b>
</td>
</tr>


and looked to the result. If I klick a property it shows me nothing. Only a blank site.

Then I have tried to remove only the first one.
Result: blank site.

Then i Have tried to remove only the second one.
Result: blank site.

Dosn't seems to work, if only remove exactly these lines.
Or should I remove

<?php
}
?>
before and

<?php


after the lines?

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

More
11 years 7 months ago - 11 years 7 months ago #19830 by Sky
Replied by Sky on topic Re: Remove Featured and Total Viewing
If you are doing this locally, and made backup file, and left it inside of that folder, remove it somewhere else (on desktop).. Same goes if u uploaded extra file on host..

I told u exactly what i commented, i still have it in side of file, so, not sure why u have blank page...
Last edit: 11 years 7 months ago by Sky.
The following user(s) said Thank You: Patrik

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

  • Patrik
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 7 months ago #19832 by Patrik
Replied by Patrik on topic Re: Remove Featured and Total Viewing
WOW,

my mistake.

Works really great. The problem was, i left the listings.html.php.bak on the server.

Erased the .bak file and uploaded the modyfied listings.html.php, and wondering it works really great

Thanks very much

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

More
11 years 7 months ago #19833 by Sky
Replied by Sky on topic Re: Remove Featured and Total Viewing
Hehe, np ;)

Same thing happen to me. While i lost like 2 days figuring why am i getting blank page, almost deleting whole web since i couldnt find reason. In the end, by accident i was pointing in dark, and deleted backup file... problem was solved :)

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

More
11 years 7 months ago #19846 by PSeers
Replied by PSeers on topic Re: Remove Featured and Total Viewing
If you get a blank page it is usually because of a php error. Most causes usually forgot ; or when commenting out forgot to comment out all of the function or a bracket left uncommented from an if..else statement. I have been messing with adding/deleting stuff in this component and get a blank page enough to have figured this out. just make sure your php is correct when editing and you shouldn't see a blank page.


Philip

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

More
11 years 6 months ago #20064 by Toon
Replied by Toon on topic Re: Remove Featured and Total Viewing
hej i have the same issue.... But I didnt have any backup files or whatsoever..deleted those 2 options..
I also changed the name and even the extention of the listing.html.php and tested it..all i could see were blank pages.
A friend on another computer in another country, also saw a blank page....

I really want to remove featured and total viewing... but have no clue how.

would love your help...

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

  • Patrik
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 6 months ago - 11 years 6 months ago #20065 by Patrik
Replied by Patrik on topic Re: Remove Featured and Total Viewing
Hey Toon,

you have deleted the 2 Options in listing.html.php?
and you dont have renamed the original "listing.html.php"?

What do you mean "I also changed the name" ????

Patrik
Last edit: 11 years 6 months ago by Patrik.

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

More
11 years 6 months ago #20066 by Toon
Replied by Toon on topic Re: Remove Featured and Total Viewing
I meant that i changed the name and extension of the copied file..and deleted the 2 blocks from the file...so i did exactly what was told and why i change the name and extension? So it would be a same file with same name in the same folder ..but thats not important coz i did what was adviced and no backup files in the folder so idk what i did wrong :s

How come it doesnt work in the configuration by just unchecking the box "show views?"

Would really need help ..thnx all

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

Moderators: Mr. DamNguyen Phu Quan