osDate 3 = OsDatePDO! Beta is released!
« on: October 12, 2014, 09:28:06 PM »
Hi, here you can get the last version of osdatepdo:

https://sourceforge.net/projects/osdatepdo/

osDatePDO
----------

This is a major release.

And this is only a beta version for testing, not for production sites!

Please send INFOS ABOUT BUGS only in osdatepdo.com forum.

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 implimented alongwith 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 implimented 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 implimented 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 alongwith 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 informations. 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 manu 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.

October 2014, Best regards, Christian
« Last Edit: October 13, 2014, 04:22:09 AM by chrissio »
osDate 3.0 (osDatePDO) based on original Developer Copy of osDatePDO 3.0 | PHP: 5.7 | MySQL: 5.5.24 | Apache 2.2.22 | Debian 7.8 |

Please ask questions in forum - no pm support!
If you write a pm, use german oder english language, please!

*

Pharg

  • *****
  • 2,071
  • osDate Version: osDate Evo v1.0
Re: osDate 3 = OsDatePDO! Beta is released!
« Reply #1 on: October 12, 2014, 09:52:37 PM »
Hi chrissio,

Thanks heaps for the osDatePDO Beta, Saving all that help info in a PDF so I can remember it all ;)

Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

Re: osDate 3 = OsDatePDO! Beta is released!
« Reply #2 on: October 15, 2014, 08:16:31 AM »
I don't care for PDO! I have the original and work on it is null. I have no mod rights to remove posts like this and in so be it.

Go for it PDO... fans...

PDO brings you smarty 3 which is great but adding jcarousel in jquiery sucks. VJ gave it up for a reason and I know why.

Start your own topic about PDO please not here...  I use on many sites version 4.03 that uses Smarty 3 and many other things but as things go on I don't think I will ever release it to the public.

Re: osDate 3 = OsDatePDO! Beta is released!
« Reply #3 on: October 15, 2014, 06:20:21 PM »
I don't care for PDO! I have the original and work on it is null. I have no mod rights to remove posts like this and in so be it.

Go for it PDO... fans...

PDO brings you smarty 3 which is great but adding jcarousel in jquiery sucks. VJ gave it up for a reason and I know why.

Start your own topic about PDO please not here...  I use on many sites version 4.03 that uses Smarty 3 and many other things but as things go on I don't think I will ever release it to the public.

Hey scvoyager - what is your problem?

I think, your Script is based on osDate 2.5 or 2.6 - so it can be 2.xyz-Version, but cannot be a 3.x Version.

And the rest of your posting ...uses 4.03...: Osdate was official released up to 2.6.0, Version 3 (pdo) was the downstream product of osDate developers.

You can also disable jcarousel, if you don't want to use. Therefore you only needs a mouse click in admin panel.

Why do you say to pdo is no longer working? I see others progress ...
osDate 3.0 (osDatePDO) based on original Developer Copy of osDatePDO 3.0 | PHP: 5.7 | MySQL: 5.5.24 | Apache 2.2.22 | Debian 7.8 |

Please ask questions in forum - no pm support!
If you write a pm, use german oder english language, please!

Re: osDate 3 = OsDatePDO! Beta is released!
« Reply #4 on: October 16, 2014, 06:24:22 PM »
The simple truth of the matter is that applications using MySQL and older versions of PHP  will simply cease to function. Once all the hosts abandon using it due to its security vulnerabilities, everyone will be forced to either rewrite their code or upgrade their applications..  Now don't panic, it wont happen suddenly overnight, but it will most certainly happen. MySQL and older versions of PHP are simply too easy to hack into and have been patched and patched to the point of uselessness, every time they close one opening, hackers find another.

Although no one likes change, it is inevitable and the time has come that in order to have secure sites operating, we must incorporate the new changes.

To circumvent all the hacks, they first came up with MySQLi , the "i" on the end standing for "improved" , a short time later PDO came out. These are both languages that are used to communicate with your applications databases... which is better is still to be seen and I wont state an opinion on it because it will simply start a war between people who like MySQLi and those who like PDO.

MySQLi is simply MySQL with a few improvements that are supposed to make it more secure. How secure is it ?... still to be seen.

PDO the best way I can explain it is that your code are objects... think of them as a picture printed out on photo paper... if you do happen to get a hold of it you can't alter or inject anything into it and therefore is secure... How secure...still to be seen.

The certainty , however is that MySQL is on the way out and those running on it will one day be left behind wondering why they're suddenly getting " Unable to connect to databse" appearing on their screens.

With all that said, I look forward to a new release of osDate with either MySQLi or PDO.

I did download and install the PDO version, but it did give a pile of errors and the plugins didn't work properly, also couldn't register a new member... but that's what beta versions are for afterall.





Re: osDate 3 = OsDatePDO! Beta is released!
« Reply #5 on: October 18, 2014, 06:27:41 PM »
...

I did download and install the PDO version, but it did give a pile of errors and the plugins didn't work properly, also couldn't register a new member... but that's what beta versions are for afterall.

Hello Primal,

thank you very much for your statement.

in this moment i test osDatePDO on PHP: 5.5.15 - one of the Plugins (langBanners) i fixed yesterday... it is a lot to work in the script to fix all bugs.
In the moment i read "couldn't register a new member" i tried to register a member - without problems, and my testinstallation was installed yesterday evening on a fresh server.
So i have no idea whats wrong in your installation. I would like to test it on your installation if possible.

Greetings from germany, Christian
osDate 3.0 (osDatePDO) based on original Developer Copy of osDatePDO 3.0 | PHP: 5.7 | MySQL: 5.5.24 | Apache 2.2.22 | Debian 7.8 |

Please ask questions in forum - no pm support!
If you write a pm, use german oder english language, please!