Hi heebeha,
Fristly, osdate 2.54 / 2.6.5 both use Smarty 2 where as osDatePDO uses Smarty 3
Learn all about Smarty 2 and 3 tags here
http://www.smarty.net/You would have found the answer in this post at
https://www.osdateforum.com/announcements-discussion-3/osdate-3-osdatepdo!-beta-is-released!/It's says there how to set it all up and about the templates being totally different, older templates don't work on this version!
Backup your site fully before installing, it's for testing only!!This is only a beta version for testing only, not for production sites!The upgrade path from earlier versions is very limited.
You must have osDate 2.5+ version to directly upgrade. For others, you need to follow the path of export/import of data and ensure the data is adjusted properly using appropriate programs.
Most importantly,
- Only 'default' template is included full functionally. You need to make changes in all other templates as you need it and as you want it to work based on default template design and functioning.
Old Templates are in folder /template/old_templates
- osDatePDO require PHP5+ (PHP5.5+ is better) and mysql 5.1+
- This uses Smarty V 3.1.19
Changes done in osDatePDO.
--------------------------
An API (Application Programming Interface) for osDate is defined.
1. The database interfacing is made more simpler. Following functions are available to manage data.
a. For managing data of a particular table, use the function
manageTableData(action, tablename, tablefields, condition, sortorder, limit)
action = 'selectall' - to select all records from the table
'selectrow' - to select one single row from table
'selectone' - to select one value from the table
'update' - to update table field values
'insert' - to insert records into the table
'delete' - to delete row(s) from table
tablename = the tablename for data management
tablefields = For select oriented queries, this is the array of field list
For update and insert queries, this is the associative array of
field => value pair
For delete, just give false.
condition = This is the associative array of condition (field => value pair)
This function will evaluate only 'equal' condition.
sortorder = Sort order as a text field (this should include the field name and
sort order)
limit = This is the limit of number of records to be selected.
Some examples:
a) To select all records from mailbox table for a user
manageTableData('selectall', MAILBOX_TABLE, false, array('owner'=>$userid));
b) To insert a record in inbox
manageTableData('insert', MAILBOX_TABLE, array('owner'=>$userid, 'folder'=>'inbox',
'senderid'=>$senderid, 'recipientid' => $userid,
'subject'=>$subject, 'message'=>$message, 'sendtime'=>time()));
c) Delete all record from 'sent' folder for the user
manageTableData('delete', MAILBOX_TABLE, false, array('owner'=>$userid,
'folder'=>'sent'));
d) To check if the user is online
manageTableData('selectone', ONLINE_USERS_TABLE, array('is_online'),
array('userid'=>$userid));
b) If the query is not from one table or require complex where condition, use following
functions as needed
a) getAll(qry, substitutevalues) - To select all records resulting from the query
b) getRow(qry, substitutevalues) - To select the row resulting from the query
c) getOne(qry, substitutevalues) - To select one value resulting from the query
d) osd_query(qry, substitutevalues) - To execute a complex query
qry = The sql query
substitutevalues = The parameter values to be substituted in the sql query
c) To manage data from USER table
a) To select details of a particular userid, use the function
getUser(userid)
b) To select some field values for a user, use the function
getUserFields(userid, fields)
where fields is the array of fields to be selected
c) To update some field values in user table, use the function
updateUserFields(userid, fields)
where fields is the associative array of field=>value pair
All sql queries of all PHP programs and plugins are modified to use this intreface.
These interface functions remove the need to use the $osDB variable in any program.
2. Following PHP functions are available for extracting some important data
a. getStates(countrycode, allstates="Y", sortorder="name")
This function returns the array of states defined for the country
b. getCounties(countrycode, statecode, allcounties="Y", sortorder="name")
This function returns the arry of counties defined for the country and state
c. getCities(countrycode, statecode, countycode, allcities="Y", sortorder="name")
This function returns the array of cities defined for the country and state and county.
If county is omitted, it will return all cities available in the country and state.
d. getZipcodes(countrycode, statecode, countycode, citycode, allzips="Y", sortorder="code")
This function returns the array of zips defined for the country and state and county and city.
If city or county or state is omitted, it will return zip codes for defined combination.
e. getCityName(countrycode, statecode, countycode, citycode)
This function returns the city name for the given combination.
f. getStateName(countrycode, statecode)
This function return the state name
g. getCountyName(countrycode, statecode, countycode)
This function return the county name
h. getCountryName(countrycode)
This function return the country name
i. mailSender($hdr_from, $hdr_to, $email, $subject, $body, $attachment='')
This function sends email to outisde email id of the user
$hdr_from = The from email address
$hdr_to = The to email address
$subject = Subject
$body = The message text
$attachment = The attachment file, if any
j. checkOnlineStats(userid)
This function returns 'online' if the user is online. Otherwise it returns 'offline'.
k. getOnlineStats(userid)
This function returns true if the user is online. Otherwise returns false. This is additionally
defined for checking the online status easily.
3. The javascript library jQuery is implemented along with following jQuery plugins
a) corners
b) select_skin
c) easing
d) jcarousel
e) textlimit
f) jQuery_UI
4. Default skin screens are modified to use the full width of the screen. This change is applicable
to almost all tpl files.
5. All screens and sub sections in the screen is beautified by rounding all corners using CSS framework.
6. Scrollable blocks are implemented to all those portions in the homepage e.g. Featured Profiles display,
New Users display, Random Profiles display, etc.
7. The top menu system is slightly modified. All options in the menu is now shown with rounded background.
8. The news and story blocks in the home page leftcolumn now has scrollable facility.
9. Default homepage header is now modified to remove the partitioned picture and to use
CSS based background rounding for the simple search criteria acceptance part.
Also, the login part is now made as part of header itself.
10. All tabulated displays are now stripe enabled i.e. all rows in the table will display a different
background when cursor is on the row. This will easily identify current row. This is extended
to all those blocks where multiple choices (checkboxed and radio buttons) are being displayed
like advsearch screen.
11. All admin pages are modified to use rounded corners.
12. All plugins are modified to use rounded corners and where ever tables are used, it is modified to
use row level striping.
13. All buttons are beautified.
14. Where ever possible, tabs is implemented to display data (e.g. adv search, edit profile, global
setting editing, etc.)
15. User profile changes are now recorded and kept in system. It works in following way:
a) You can define the user table changes which should he managed using this system, This is the array
given in config.php ($modify_fields ). Please define the exact field names given in the USER table.
Once you define the fields, you need to give the Language specific field names in the array defined in
language file for these fields to be displayed in the screen. (refer $lang['userdatafields'] )
b) When the user make change to any of the fields given in the list ($modify_fields array), it will be
stored in the table USERCHANGES.
c) If approval is not required by admin (i.e. the automatic activation is enabled by admin for profiles),
Then the data will be updated immediately. A mail will be sent to admin and the user about changes made.
d) If approval is needed, it will be kept in abeyance till it is approved by admin. Admin menu have two
new options - Approve User Changes and User Changes. If any approval is pending regarding changes by user,
it will be listed in Approve User Changes. Admin can approve or reject changes. The action will be informed
to user and data will be updated if approved. Admin can view history of user data changes using the option
userchanges.
e) The user menu has the option to view changes done by the user - approved and rejected and pending approval.
16. Displaying of different blocks in homepage is now in a mix of Tabs format and fixed portion format .
The blocks to be displayed in Tabs can be defined in the array ($homepage_blocks) in config.php. You need to
adjust the homepage.tpl to display other blocks not included for Tabs display method. By default, it assumes
all blocks. If any block is not needed in tabs, you will need to explicitely display the block in
homepage.tpl.
In global settings, there is a flag to use Tabs display method for homepage blocks. ('Use TABBED display
method to show information blocks in home page? ). Default is 'Y'.
17. Now a profile can be hidden. The user can opt to hide his/her profile. If hidden, that profile will not
be included in searches, in any of the special display blocks like Featured Profiles display, IP Locationwise
profiles, Newest Profiles, etc. However, this HIDEME function is not applicable in ADMIN section.
18. Now the membership level for visitors are defined in Global Settings. This allows to define membership
levels with various rights and not to define a level with 'Visitor' as name.
19. Default template design is modified. Now the user stats are shown in the header potion after the user log in.
Same way, the quick login screen is moved along with the Special Offer block.
20. Quick search block is improved and is in righthand top corner.
21. In the leftcolumn, there is a block which displays online users which scrolls automatically.
22. There are some functions defined in database level. This will ease data extraction from database.
These are defined in the file /sql/osdate_db_functions.sql file.
23. There is a view user_details defined which will contain all user related information. This is an
extension of user table.
24. Now the server admin can decide how user pictures will be stored. IF in file system, there is an option to
store pictures entirely in single folder or in sub folder for the user. ALso, if your site has many users,
you can define parameter to group your users. This will ease file management in server side.
25. Pictures and album management is improved. Now you can define multiple albums and assign same picture to multiple albums. This will reduce disk storage use in server side.
26. Now same user can give multiple comments to a profile. Also, the rating is separated from comments.
27. All available plugins are improved for performance and modified to use new defined functions for DB access.
Installation Notes:
-------------------
To install osDatePDO, follow these steps:
a) If you already have osDatev2.6 site and want to upgrade this to osDatePDO,
- then copy all your files to the osDatePDO root folder. Ensure /temp folder is copied over fully.
- Give 777 rights to all files/folders under /temp folder.
- Rename existing /temp/myconfig/config.php as /temp/myconfig/config_bkp.php
- copy /temp/myconfig/config_bkp.php as /temp/myconfig/config.php and edit /temp/myconfig/config.php and remove all lines from the file except those which define database details as given below
define( 'DB_USER', '' );
define( 'DB_NAME', '' );
define( 'DB_HOST', 'localhost' );
define( 'DB_PASS', '' );
define( 'DB_TYPE', 'mysql' );
Give correct values for these fields.
b) Copy all files from the osDatePDO distribution set to respective folders under osDatePDO root folder.
c) If you are installing fresh, then just run the installer and follow steps. If you are upgrading, run installer and choose upgrade mode and follow steps.
d) Rename /install.php and /install folders to install_bkp.php and install_bkp folder.
e) Give appropriate rights to folders and files.
f) Take a full backup of your installation (files and folders and mysql database).
Now you are ready to use new system and test this version.