GithubHelp home page GithubHelp logo

missallsunday / breeze Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 2.0 8.14 MB

Breeze allows your users to turn their profile pages into a dynamic wall where they can publish new status and comment on other user's status.

License: Mozilla Public License 2.0

PHP 87.16% CSS 1.53% TypeScript 9.86% JavaScript 1.03% HTML 0.04% Shell 0.38%
smf smf-modifications

breeze's Introduction

Hi there ๐Ÿ‘‹

Anurag's GitHub stats

Top Langs

breeze's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar missallsunday avatar xinyenfon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

erikuy hrctom

breeze's Issues

General Wall

I have pretty much everything I need to build the general wall page, the hook, the DI, the notifications, all is already there.

A last minute inclusion to finally get to feature locked status.

Move BreezeDisplay to the container class

It won't do much but it would be nice to have it as part of the whole Dependency Injection thingy.

At some point I would like to call specific templates like this too, to avoid having a lot of redundant code in the template files and also to reduce the amount of files I need to change.

Delete ancient remnants

BreezeQuery is full of old code, I spent a lot of time building it and I really thought it was good but it turns out ti wasn't that good.

Theres a lot of CRUD methods that relies on a centralized source of data, that is, all possible comments of all possible walls are fetched when someone wants to see just one wall, the same applies for status.

Of course this isn't close to be somehow efficient, thats why I moved to a "per profile" view where each wall loads its own set of status/comments, still, this approach isn't modular enough but at least it works out pretty decent.

Thing is, I want to get rid of all those old methods, I just am scare of breaking something else since I don't know if another file or set of methods still relies on any of those old methods :P

Create multiple template files

  • Instead of one gigantic template file, create several.
  • Theres a lot of code that can be re-used, separate each code block into smaller template functions and just call them whenever I need them.

General wall, a per user option?

There should be a master setting for the general wall but I wonder if there shall be a per user option to enable/disable their general wall, I mean, after all, each general wall its unique for them.

Do not use an array for showing status on wall

Currently Breeze load all status into an array and then the pagination splits the array into smaller chunks.

This can be problematic if users have hundreds of status to be loaded, the array can quickly become huge and can eat up a lot of memory.

mmm, thinking a bout it, why cannot have the best of both worlds? use a single array when the number of status is relatively low and use the SMF system when the number of status gets bigger.

Now I gotta think in an efficient way to do this without messing too much with other things.

Get killCache() to delete the right cache entry

I'm in the middle of moving from a centralized world to another one based on a "per profile" basis so, to delete the right cache, BreezeQuery::killCache() needs to know 2 params, the ID and the name of whatever its going to delete.

Working with tabs is extremely annoying

I tried several, all of them does all kind of weird bouncy stuff, some others requires the ul to be tied up with the divs they are controlling, this generates all types of issues with my template system.

There are other issues as well, for example, the infinite scroll gets executed regardless of which tab are you in, this causes the browser to go nuts if you are viewing a tab that doesn't have any content because its very short and triggers the infinite scroll script in an infinite loop because the actual page height isn't getting any bigger.

I think the best course of actions for this would be to just set separate pages for each tab, this not only means less JavaScript issues but also means I will have more control over the pages, not to mention the main template will look a lot less cluttered.

Converters?

It might be good to offer a way to convert other similar scripts, I have no idea how to do that and I'm clueless about SQL languages.... sounds like fun!.

Should be simpler than the regular X to SMF converters, same DB, less tables, less hassle.

Find an option to enable the wall for all users by default

I'm using the "per theme" options to store all possible per user options. This has some advantages:

  • It is incredible easy to add new options, it is just a matter of adding another method to the form class.
  • The options are autoloaded by SMF by default, I do not need to worry about that.

However, it has some disadvantages as well:

  • Its a "per theme" settings, if an user decides ti use a new theme or the admin forces a new theme on the users, all previous settings will be lost.
  • There is no realistic way to enable the wall for all users, that is, to create the per theme setting for each user since it depends on the theme ID and even if I could, it would be pretty heavy on the server for medium sized forums and above.

What I was thinking is, to create another admin setting to "force" the wall to be enable and only use this setting until the user itself creates the proper user setting by going to his/her wall settings page, it seems like a simple solution but I just don't know if it will work or if it won't have any nasty side effects due to the obscure logic been applied.

Move all of $context['html_headers'] to the buffer hook

I don't trust $context['html_headers'] anymore, there are too many naive mod authors out there who happily replace all the previous content of that var instead of appending their own data via .=.

Moving all the stuff to the buffer hook would allow me to avoid this annoyance and also would allow me to get more control about it.

Oh sweet merciful Poseidon!

BreezeSettings an BreezeText are both still using a foreach to get the strings and settings Breeze needs... I thought I changed this already!

Yeah, lets use the SMF pagination system

and ditch the array pagination entirely, it is easier this way...

I still like the pagination via a single array but the amount of data this mod will handle makes it unusable on the vast majority of forums.

Make good use of the error system and combine the ajax response

Since theres a new overcomplicated system to fire messages I may as well make proper use of it providing actual and handy error instead of the default "there was an error" message...

And also do a bit of re-factoring, there seems redundant to declare a message as error and also need to set the message as error_something, just seems like a waste to me :(

And while I'm at it, I might as well integrate the whole ajax response system too, make it unique and cut off all those nasty if (true == $this->noJS) on every method.

Move breezeCheckPermissions()

Since now theres also the wall page, breezeCheckPermissions should be a general function available from both the profile and the wall actions.

Probably the $context var should be changed too to a more Breeze-specific name to avoid possible collisions with other mods

Yikes! BreezeAjax is borked

Currently BreezeAjax can only handle post been sent from the profile page.... (insert Lemongrab's This is UNACCEPTABLE!!!!!!)

Gotta find a way for BreezeAjax to accept data from the general wall as well.

If someone else wants to post their own data from somewhere else they can use BreezeQuery::insertStatus() for that.

Make a button for the summary page

For some reasons SMF has two buttons pointing to the same page, both the profile ad the summary sub-button go to the same page, I guest I should replace the summary button and point that out to the static summary page.

Enhance buddy request

Theres a couple of things that would be good to have when asking someone to be your buddy:

  • Add an option for the requester to send a custom message.
  • Add an option to let the requested user to respond back with a custom message.

Move the sigle status page to Wall action

Leaving the single status page in the profile action has some issues, specially if someone is trying to view a status on someone else's profile.

Single status needs to be moved to a subaction in wall action.

Gotta use the master setting

Yeah, there is a master setting for enable/disable the mod, I gotta make sure everything is under this master setting.

Improve buddy system

Adding notifications to the existing buddy system isn't as simple as it might seem to be, theres some logic that needs to be applied and there are multiple cases, all of them must be taken into account.

I merely used the system in local, thus, I'm only aware of a few possible cases where the current buddy system might have flaws, this is where beta testing enters and saves the day but thats not going to happen so I should play the user role as much as I can.

The cases I've know so far includes:

  • User A sends a buddy request, then deletes if Before user B has the chance to confirm/deny it, what should happen then? I suppose the code would need to check the status of said request and if it hasn't been confirmed or denied then inform back to the userto chose what to do, either delete it or wait until user B takes action.
  • User A sends a buddy notification and User B denies it, currently the notification system does not notify User A about the denial, it should be since user A has no idea user B denied the request.
  • User A sends a buddy request, user B accepts, then eother user A or B decides (s)he no longer wants to be buddies with the other person, what should happen then? does the current behaviors should be preserved? that is, user A can be buddy o user B but not the other way around or should friendship needs to be terminated from both sides?

There might be other cases but as I said, without testing its pretty difficult to catch all of them.

Move buddy logic

Theres a lot of buddy system logic in the notifications logic, this should not happen, notifications should only care about notification logic.

Notification should not care if a buddy noti has been sent or not, it should only receive valid instructions to create a new buddy notification.

Admin page for logs

To manage logs entries, mass-delete, etc.

Set some options to load logs from a certain period of time.

Perhaps enabling and configure a scheduled task to make the deletion automatic.

a tiny "my mood" feature?

It is relatively easy to use the custom profile system to add more fields and I already did something similar on the award mod.

Pointless class

It is pointless to have BreezeDisplay been a class when it can be done with a function, perhaps it is not even worth having its own file.

I still need to know if the SMF template system can be used to format data and return it back instead of printing it to the browser, if this indeed can be done then there is no piint in having a separate file for this since the controller is pretty much non-existent and can be merged into some other controller file and either build a separate template file or appending it to an existing template file as a separate function.

Make a simple closeAll button for notifications

I know it can be very annoying to have multiple notifications with no way to delete them all at once, noty offers a nice way to close all at once: $.noty.closeAll()

Perhaps this can be set to an user setting too, let them chose if they want the notifications to be closed after X seconds, of course I would love to hear some feedback on this but I know thats not going to happen.

Delete notifications too

When a status/comment is deleted, we got to make sure to delete all possible notifications that are related to that status/comment.

Hooks

Been thinking about adding hooks for the most common arrays and specific locations for a while, better write this down before I forget.

Use the SMF editor?

I'm not really a fan of the editor, thing is, people are so spoiled and having a naked textarea is just too ugly for them. Not to mention people would want to use BBC.

If implemented, it would need to be an admin setting, disable by default and maybe a nice option to switch between simple and full editor, meh, this means even moar javascript.....

Add support for 5.2?

I don't know how many SMF users are still using PHP 5.2, don't know if it's even worth.

Breeze is pretty much compatible with 5.2 except for two files that happens to be the neuralgic center of the mod:

  • BreezeController
  • BreezeContainer

In theory I could replace the closures with create_function(), the problem is, the use() keyword, I don't know of any real way to replace it.

Weirdness with notifications

If you mark as un/read or delete from the users panel the text strings are mixed up and both the notification and the redirect for non JavaScript users are called.

Cannot modify more than 1 notification

When an user has multiple notifications only the first notification clicked will work, if an user mark a second notification there will be an error saying said notification was already deleted.

This is related to #3 I need to use onClick to pass all the vars I need intead of relying on tricky methods such as using the ID or the class to get the values.

Text Strings

They do need to either get separate files or get properly re-done using a common format for handling them, currently there is too much redundancy and you can't re-use them at will, some of them are repeated or solely built for specific actions.

Re-factor all the JavaScript

The current Javascript is weak and fragile, it needs to be changed, as much as I don't want to use onClick() I have to, I need to be able to pass multiple values to the server via ajax, the current code I have for doing this is buggy and is not really that solid.

Show the actual date when hovering

elapsed dates are cool and stuff but they are not precisely accurate... showing the date using SMFs time functions on hovering should be a nice little addition.

Add support for users without JavaScript

I would like to add some basic support for those users that doesn't have JavaScript for whatever reason, in theory it wouldn't be that hard since BreezeAjax can be called with an standard http request, in fact, thats how I do debugging stuff by sending plain http get request to breezeajax action providing the correct data is send of course.

Providing basic support for adding and deleting both status and comments should be enough.

wallstatus doesn't load all possible comments

When viewing a single status, the page should load all possible comments and not only the comment where the user got mentioned. Instead, the comment where the user was mentioned should be highlighted.

Load poster's info

On certain circumstances, whoever writes a new status or comment data won't be already loaded and the facebox will show nothing.

This happens when someone writes the very first status on a profile or when an user hasn't yet interacted with anyone.

Dunno how to resolve this really, a simple solution would be to load the current visitor's info as soon as they land on the profile page or the general wall page.

Handling guest post

Yes, I know I didn't add the possibility for guest to post but theres still a way for that to happen, when an user that has posted on a wall deletes his/her account.

SMF already handles this for me, I just need to apply some logic and only show things like facebox, link and avatar when the user is still a member, if not, just show the guest name.

infinitescroll is borked

Something is causing infinitescroll to be borked, dunno what it is yet...

meh, I hate debuggin JavaScript :(

Cannot set more than one mention

An users cannot mentions more than one other member, does not matter if the amount of mentions is inferior to the limit set by the admin.

Side note, I absolutely love when I see a piece of code I wrote some time ago and don't have any idea of how it suppose to work :P

Add an actual limit to the query limit

Currently the query limit works with dates but depending on how busy the forum is, even setting the limit to a day couldn't be enough and a real limit (LIMIT = x) should also be set.

Notifications list

The notifications page isn't properly showing the notifications, it is printing an array when it should print a text string

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.