Skip to Content

PHP 5 Social Networking Table of Contents


Table of Contents

Preface
Chapter 1: PHP Social Networking
Chapter 2: Planning and Developing the Core Framework
Chapter 3: Users, Registration, and Authentication
Chapter 4: Friends and Relationships
Chapter 5: Profiles and Statuses
Chapter 6: Status Stream
Chapter 7: Public and Private Messages
Chapter 8: Statuses—Other Media
Chapter 9: Events and Birthdays
Chapter 10: Groups
Chapter 11: Developing an API
Chapter 12: Deployment, Security, and Maintenance
Chapter 13: Marketing, SEO, User Retention, and Monetization Strategies
Chapter 14: Planning for Growth
Index

  • Chapter 1: PHP Social Networking
    • Introduction to social networks
      • Business logic to social networks
        • Examples: Businesses making use of existing social networks and their own social networks
    • Existing social networks
      • Facebook
      • LinkedIn
      • MySpace
      • Twitter
    • Existing social networking software
      • Drupal
      • Elgg
      • Joomla!
      • Hybrid approaches
    • Rolling your own
      • Why roll your own?
        • Easier to update and maintain
        • Licensing
        • Enhance knowledge
        • Provide a service
        • Improve business
        • Improve communication
      • Why use PHP?
      • When to use something else
    • Our site: DinoSpace
    • Feature list
      • Limitations
    • Summary
  • Chapter 2: Planning and Developing the Core Framework
    • Designing the framework
      • Patterns—making life easier
        • MVC: Model-View-Controller
        • The Front Controller pattern
        • Registry
        • Folder structure
    • Building the framework
      • Registry
        • The registry object
        • Registry objects
      • Front Controller: single point of access
        • index.php
        • .htaccess
    • Summary
  • Chapter 3: Users, Registration, and Authentication
    • Privacy policies
    • Users
      • Our user object
      • Our authentication registry object
        • POST authentication
        • SESSION authentication
      • Structuring the database
    • Registration
      • Standard details
      • Hooking additional fields on
      • Processing the registration
        • Creating the profile
        • Putting it all together: registration constructor
      • CAPTCHA
        • General CAPTCHA
        • reCAPTCHA
      • Where do I sign up?
      • E-mail verification
        • Sending e-mails
        • Sending the e-mail verification e-mail
    • Authentication with our authentication object
      • Logging in
      • Are we logged in?
      • Logging out
      • Remember me
    • Help! I've forgotten!
      • Username
      • Password
        • Let them reset the password
    • Summary
  • Chapter 4: Friends and Relationships
    • Inviting friends
      • Manually inviting friends
        • Invitation controller
      • Automatically inviting friends
        • Google Friend Connect
        • Windows Live contacts
        • Yahoo!
        • Gmail contacts
      • Automatically connecting with friends
    • Members
      • Listing users
        • Pagination
        • Paginated members
        • Paginated users by letter
      • Searching for users
    • Custom relationships
      • Relationship types
      • Relationships
    • Adding friends
      • Forming a relationship
        • Relationship model
        • Relationship controller
      • Mutual relationships—accepting or rejecting a request
        • Pending requests
        • Accepting a pending request
        • Rejecting a pending request
    • Listing friends
      • Our friends
      • Their friends
        • Mutual friends
    • Friends in your profile
    • Summary
  • Chapter 5: Profiles and Statuses
    • User profiles
      • Extendable profile
      • Profile controller
        • Core shared information
      • Static profile
        • Viewing the profile
        • Relationships—some improvements
        • Editing the profile
    • Statuses
      • Statuses database table
        • Statuses types database table
        • Different types of status
      • Template improvements
      • Listing statuses
        • Templates
        • In action
      • Likes, dislikes, and comments
        • Comments
    • Summary
  • Chapter 6: Status Stream
    • What is a status stream?
    • Stream model
      • Building the stream
      • Relationships—get the IDs!
      • Friendly times
      • The rest…
    • Stream controller
      • Generating the stream
      • Comments, likes, and dislikes
        • Comments
        • Likes and dislikes
    • Views
      • Main template
      • Status type templates
    • In action
    • Room for improvement
    • A system stream for administrators
    • Summary
  • Chapter 7: Public and Private Messages
    • Public messages
      • Controller
        • Displaying profile messages
        • Displaying the post message box
      • Displaying a confirmation message
      • View
      • In action
    • Private messages
      • Database
      • Message model
      • Messages model
      • Controllers and views
        • Listing messages
        • Reading a message
        • Deleting a message
        • Composing a new message
        • Creating a message template
      • In action
      • Room for improvement?
        • Sent items
        • Replies
        • Group messages
    • Summary
  • Chapter 8: Statuses—Other Media
    • Why support other media types?
    • Changes to the view
      • Template
        • jQuery to enhance the user experience
      • View in action
    • Images
      • Database table
      • Model
        • Class, variable, and constructor
        • Processing the image upload
        • Saving the status
    • Video (via YouTube)
      • Database
      • Model
    • Links
      • Database
      • Model
    • Extending the profiles
      • Processing the new status posts
      • Altering our profile status' query
      • Status views
        • Images
        • Video
        • Links
      • In action
        • Images
        • Videos
        • Links
      • Repeat!
    • Summary
  • Chapter 9: Events and Birthdays
    • Let's plan
      • Calendars: what do we need to be able to do?
    • Calendar library
      • Generating the month
      • Days in the month
      • Ordered days
      • Previous month
      • Next month
    • Displaying a calendar
      • Generate and output
      • Multiple calendars
      • With events
    • Birthdays
      • Getting relationship IDs
      • Setting up the calendar
      • Getting the birthdays
      • Passing them to the calendar
      • The results
    • Events
      • Event model
      • Events model
      • Attendees, invitations, and RSVPs
        • RSVPs
      • Controller
        • Creating an event
        • Calendar of events
        • Viewing an event
        • Upcoming events
    • Reminders
      • On-site notifications
      • E-mail notifications
      • SMS notifications
    • Summary
  • Chapter 10: Groups
    • Some planning
      • Group information
      • Types of groups
      • Ownership
      • Membership
      • Features
    • A group
      • Discussion
        • Database
        • Post
        • Topic
      • The group itself
        • Group table
        • Model
      • Creating a group
        • Controller
        • View
        • Creating a group—in action
      • Viewing a group
        • Membership
        • Controller
        • View
        • In action
      • Discussing within a group
        • Group controller additions
        • View
        • Discussion in action—viewing a topic
      • Joining a group
        • Joining (public) groups
    • Groups
      • Listing groups
        • Group controller addition
        • Template
        • In action
      • My groups
        • Addition to the group's controller
        • Template file
        • In action
    • Summary
  • Chapter 11: Developing an API
    • What is an API and why should we create one?
    • APIs in social networks
      • Facebook
      • MySpace
      • OpenSocial
    • Some planning
      • What should it do, and who should be able to do what?
      • How should it work?
        • How could it work?
        • Let's go with REST
        • Further reading
    • Implementation
      • Data format
      • API controller
        • Wait—no models?
        • Authentication
      • Delegating control: API controllers for our features
        • Profile's delegate
    • An Application Framework API
      • One solution: use OpenSocial
    • Consuming
      • POSTing data to our API with cURL
    • Summary
  • Chapter 12: Deployment, Security, and Maintenance
    • Deploying the site
      • Choosing a domain name
      • Registering a domain name
        • Popular domain name registrars
      • Signing up with a hosting provider
        • Choosing a web hosting provider
        • Considerations for hosts of social networking websites
        • Popular web hosting providers
      • Setting the nameservers for the domain
      • Creating a database on the hosting account
        • With cPanel hosting control panel
        • With appropriate privileges on phpMyAdmin
      • Exporting our local database
      • Importing our local database to the hosting account
      • Changing some of our database records
      • Changing our database configuration options
      • Uploading the files
      • Testing
    • Automating deployment
    • Security
      • Server Security
        • Software
        • Securing the site with a firewall
        • Shared hosting precautions
      • Passwords
      • Error reporting
      • Directory listings
      • SPAM
    • Maintenance
      • Backing up and restoring your social network
        • With cPanel
        • Using the command line
        • Do they work?
      • Access logs and statistics
    • Summary
  • Chapter 13: Marketing, SEO, User Retention, and Monetization Strategies
    • Marketing
      • Online advertising
        • Pay-Per-Click
        • Advertising space
        • Newsletter advertising
      • Newsletters
      • Social marketing
        • Viral marketing campaigns
        • Twitter
        • RSS feeds
    • Search engine optimization
      • On-site SEO
        • Headings
        • Links
        • Up to date, relevant content
        • Page metadata
        • Site speed
        • Search engine goodies—sitemaps and tools
      • Off-site SEO
      • What to look for in an SEO company
    • User retention
      • E-mails for the user's action
      • User feedback
      • Hello there!
    • Monetization options
    • Final tips: web stats
    • Summary
  • Chapter 14: Planning for Growth
    • Code performance
      • Code profiling
      • Slow queries
      • Compression
      • Useful tools and resources
    • Server performance
      • Apache
      • MySQL
      • Alternative web servers
    • Scaling
      • VPS Cloud Hosting
      • Additional servers
    • Caching systems
      • Memcached
      • Available caching systems
    • Redundancy
    • Content Delivery Networks
    • Message queues
      • Message queue versus database table
      • What can we queue?
      • Processing queued tasks
    • No SQL
    • Learn from the experts
    • Farm it out
    • Summary

Book backreference: 
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source Content Management Customer Relationship Management e-Commerce e-Learning Java Linux Servers Networking & Telephony PHP Web Graphics & Video Web Development
Enterprise BPEL Microsoft Oracle SOA Web Services
Other Packt Books .Net Web Graphics & Video Beginner Guides Cookbooks