PDA

View Full Version : Intergrating a new page.


Dygear
01-02-2010, 04:49 AM
Abstraction
What I am looking to do is adding a new php page to the vB file system. This page should look like it's apart of the normal install, and should use functions from within vB, this page will be protected by the login, where users has to be a super moderator or above to use. It will call variables from each user's profile, like the user list but a lot more focused, and only return the results based on who as set the information required.

The File
The file it's self will be called, sms.php. This file will be integrated into the normal theme of the website. Should who ever is viewing the file, have a different active theme as their preference, then the theme of the page should reflect that. If the user has a level equal to or grater then super moderator, then they should be allowed access to the page, otherwise a warning is returned telling the user they do not have access and they will be redirected back out. Should access be granted based on user level, they are required to place their password back into the field to make sure some one has not hijacked their session. Once the user, hereby called authenticated member it's properly credentialed, the authenticated member is then taken to the main screen.

The Main Screen
The main screen is the first page the authenticated member sees upon entering with the correct credentials. It will show a list of current users who have set custom variables within their profile allowing this forum to send SMS messages to that user's cell phone. This is on the user's part an opt in system, and is not required. The authenticated member can select based on usergroup and/or individuals whom they wish to send the sms too. They can then write the message, and press send. This will cause a reload of the screen, and once again asked the authenticated member to authenticate again, with their password.

Querys Made
The querys made will be if the user has set their 10 digit phone number within their profile, and if they have set their phones carrier and if they have opted into receiving SMS messages from this forum. The query will return a set of results for all users who have opt'ed into this system including their user group. On submit, of the main screen's forum data, we will simply send the SMS based off the user id returned in the form.

Security
No authenticated member is to ever know the number or carrier that the user is on. This data is held private. Only the user and the highest administrator can see these fields within the users profile. This data my be shared with the user's friends, if the user so wishes, but that also is at the discretion of the user.

Current Implementation
I have already made this system, but it does not use the vB user information. My next step is to integrate it directly into the forum system. My current implementation only allows for messages to be sent over the carriers SMTP service, however I'm working on the SNPP implementation, and an APNS implementation.

Dygear
01-03-2010, 08:22 PM
For people who has found this page via searching, I've found the answer here:

Problems integrating external PHP pages with VB4 (https://vborg.vbsupport.ru/showthread.php?t=231999)
[HOW TO - vB4] Create a own vBulletin page (https://vborg.vbsupport.ru/showthread.php?t=228112)
[HOW TO - vB4] Rendering templates and registering variables - a short guide (https://vborg.vbsupport.ru/showthread.php?t=228078)