OS Property support center

MONITORING - listing.html.php

  • sti
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
11 years 2 months ago - 11 years 2 months ago #25818 by sti
MONITORING - listing.html.php was created by sti
this file is huge in my opinion
it consist all below in one page.

# class HTML_OspropertyListing
# Advance search function
# function showPropertyCityListing
# List all the properties of one property type
# List Properties
# Property details
# Listing photos
# Edit Property
# Update Form step 1
# Confirmation Upgrade
# Property details
# Generic the pdf layout page
# Thank you page
# Approval details
# Confirm approval
# Generate photo by manually

is there a way to separare the functions into another file etc?
its easier to monitor and apply changes.

take this as feedback, user friendly design coding.
i got a bad headache looking at it everytime
Last edit: 11 years 2 months ago by sti.

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

More
11 years 2 months ago #25820 by Mr. Dam
Replied by Mr. Dam on topic Re: listing.html.php
Hi,
You can seperate those functions into several files as you want, for example
advancesearch.html.php
and make class like
HTML_OspropertyListingAdvancesearch
and in listing.php, you can replace
HTML_OspropertyListing::advSearchForm($option,$groups,$lists,$rows,$pageNav,$param)
by
HTML_OspropertyListingAdvancesearch::advSearchForm($option,$groups,$lists,$rows,$pageNav,$param)

You can view the struture of file listing.html.php to see more details when you create source files for different functions.
Dam

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

  • sti
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
11 years 2 months ago #25826 by sti
Replied by sti on topic Re: listing.html.php
thanks!

what does line meaning btw?

HTML_OspropertyListingAdvancesearch::advSearchForm($option,$groups,$lists,$rows,$pageNav,$param)

with prefix HTML means there is a template etc?

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

  • sti
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
11 years 2 months ago #25859 by sti
Replied by sti on topic Re: listing.html.php
for listProperties class there is few instances

OspropertyListing::listProperties()
HTML_OspropertyListing::listProperties


do i need to rename the all instances or only HTML ?

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

More
11 years 2 months ago #25866 by Mr. Dam
Replied by Mr. Dam on topic Re: listing.html.php
About listProperties, i think you had better not to change any thing. Because it is called by several different other functions.
Thanks
Dam

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

  • sti
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
11 years 2 months ago - 11 years 2 months ago #25891 by sti
Replied by sti on topic Re: listing.html.php
Ok. noted.
i would not touch any function that repeat more than twice.
the below is ok i assume?

printPropertyPdf
printPropertyEmail
updateFormStep1
thankyouPage
favorites
editListing
searchList

untouched -cause many instances
editproperty
listProperties
listingPhotos
Last edit: 11 years 2 months ago by sti.

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

More
11 years 2 months ago #25894 by Mr. Dam
Replied by Mr. Dam on topic Re: listing.html.php
Hi,
I think you can run it, and if we will see the result.
Thanks
Dam

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

Moderators: Mr. DamNguyen Phu Quan