Being relatively new with PHP still I set out to create a notifications system for vBulletin 3x that is a little more modern after being inspired by a friends site. I started with asking if he would share his version, but to encourage me to learn he said he would only provide me one file. It has now been 2 months and I can't for the life of me figure this out...
The file I was provided can be found HERE. Loading the file directly (within a vbulletin 3 installation) I received an error right off the back on line 55
$notificationsQuery = get_user_notifications($userid,$vbulletin->GPC['cat'],$vbulletin->GPC['type'],$range_lower,$max_notifications);
Missing the get_user_notifications
function meant I needed to create it. Which is where the question lies, How can I go about creating this function, keeping in mind I am still newer to PHP.
What Have I done already?
Well not knowing where to begin with the function creation I used the file to make everything else I thought I'd need.
I have created my table (although still may need built upon):
CREATE TABLE notifications (
seen tinyint(2) unsigned NOT NULL default '0',
read_notification tinyint(2) unsigned NOT NULL default '0',
for_userid mediumint(10) unsigned NOT NULL default '',
dateline int unsigned NOT NULL default '0',
);
Along with template changes to accommodate the notifications.
I know there will still be more to this, but I feel this function creation needs to happen before I can proceed any further.
question from:
https://stackoverflow.com/questions/65948914/php-vbulletin-how-to-create-a-function-when-you-have-all-other-data-a-reverse 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…