Skip to content

class mobilezChat

Oliver edited this page Apr 26, 2020 · 4 revisions

www/includes/mobilez/chat.inc.php


mobilezChat

Package

Chat\Mobilezorg

author

  • IneX

date

  • 16.01.2016

version

  • 1.0

Overview

Public Properties

No public properties found

Constants

No constants found

Public Methods

execChatMessageCommand() | execPwReset() | getAdditionalChatMessages() | getChatMessages() | postChatMessage() | postGoogleMapsLocation() | saveBug() | saveImage() |

Methods

execChatMessageCommand()

Handle Chat Message Commands Deals with various special Commands requested from the Chat Message

public execChatMessageCommand(mixed $user_id, mixed $command, mixed $parameters) : mixed

Tags
  • author: IneX
  • version: 1.0
  • since: 1.0

execPwReset()

User Password Reset Resets a User's password and sends the new one by e-mail

public execPwReset(mixed $email) : mixed

Tags
  • author: IneX
  • version: 1.0
  • since: 1.0
  • global: object $pdo_db Usersystem Object, contains all User methods

getAdditionalChatMessages()

Get additional Messages Queries and returns additional Chat Messages from a specific starting point.

This is required for something like a "Load more"-button.

public getAdditionalChatMessages(mixed $start_date, mixed $limit = 25, mixed $order = 'date') : mixed

Tags
  • ToDo: combine this function into getChatMessages()
  • author: IneX
  • version: 1.0
  • since: 1.0
  • global: object $pdo_db PDO-Database Object, active SQL-Connection

getChatMessages()

Chat Messages Query and output chat messages

public getChatMessages(mixed $order = 'date', mixed $limit = 25) : mixed

Tags
  • author: IneX
  • version: 1.0
  • since: 1.0
  • global: object $pdo_db PDO-Database Object, active SQL-Connection
  • global: object $smarty Smarty Class-object, the template engine

parseChatMessage()

Parses a Chat Message before saving Does various magics to add fancy stuff to a Chat Message before saving it

private parseChatMessage(mixed $message) : mixed

Tags
  • author: IneX
  • version: 1.0
  • since: 1.0
  • global: object $pdo_db PDO-Database Object, active SQL-Connection

postAnfickMessage()

Anfick Fickt einen User aufs übelste an

private postAnfickMessage(mixed $from_user_id, mixed $to_user) : mixed

Tags
  • global: object $pdo_db PDO-Database Object, active SQL-Connection

postChatMessage()

Save Chat Message Saves a Chat Message to the Database

public postChatMessage(mixed $user_id, mixed $message, mixed $from_mobile) : mixed

Tags
  • ToDo: Parse for User @mentioning and generate Notification (e-mail?)
  • author: IneX
  • version: 1.0
  • since: 1.0
  • global: object $pdo_db PDO-Database Object, active SQL-Connection

postGoogleMapsLocation()

Save Geolocation as Chat Message Saves a Google Maps URL as Chat Message to the Database additionally it triggers a download of a Google Maps Image file Example URL: http://maps.googleapis.com/maps/api/staticmap?size=640x480&scale=1&zoom=15&markers=color:red%7Csize:mid%7C47.39220630060216,9.366854022435746

public postGoogleMapsLocation(mixed $user_id, mixed $latlng, mixed $from_mobile) : mixed

See also

Tags
  • ToDo: Save Google Staticmap in 3 sizes: small, medium, large
  • author: IneX
  • version: 2.0
  • since: 1.0 method added
  • since: 2.0 27.08.2019 IneX included and added GOOGLE_API_KEY, maps.googleapis.com url and parameter adjustments

saveBug()

Save Bug Saves a Bug Report to the Database

public saveBug(mixed $user_id, mixed $title, mixed $description, mixed $from_mobile) : mixed

Tags
  • ToDo: Post new Bug Report as Chat message with link?
  • author: IneX
  • version: 1.0
  • since: 1.0
  • global: object $pdo_db PDO-Database Object, active SQL-Connection

saveGoogleMapsImage()

Google Maps API - staticmap Grab and save a Google Maps Snapshot and save image into user's file directory

private saveGoogleMapsImage(mixed $user_id, mixed $image_url) : mixed

Tags
  • author: IneX
  • version: 1.0
  • since: 1.0
  • global: object $pdo_db PDO-Database Object, active SQL-Connection

saveImage()

Save Uploaded Image Saves an uploaded image file into the user's file directory

public saveImage(mixed $user_id, mixed $image_path, mixed $image_size, mixed $image_type, mixed $image_name = '', mixed $image_extension = '', mixed $from_mobile) : mixed

Tags
  • author: IneX
  • version: 2.0
  • since: 1.0 method added
  • since: 2.0 27.08.2019 IneX Added Telegram Notification
  • global: object $pdo_db PDO-Database Object, active SQL-Connection

saveImageThumbnail()

Image Thumbnail Download Download a small preview thumbnail of an image link within a Chat Message for linking

private saveImageThumbnail(mixed $user_id, mixed $image_url, mixed $image_name = '') : string

Tags
  • author: IneX
  • version: 1.0
  • since: 1.0
  • global: object $pdo_db PDO-Database Object, active SQL-Connection

tagExtract()

RezaSeyf/twitterHashtags Twitter-like Hashtag system with Unicode and Hashtag Exporting system Support

private tagExtract(string $str, string $outputType = null) : string

Tags

\ » Classes » mobilezChat

Clone this wiki locally