Code Monkey home page Code Monkey logo

lampcms's People

Contributors

snytkine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lampcms's Issues

Add minified js and css support

The way it's going to work is I will have to update the "MINIFIED_JS" and "MINIFIED_CSS" constant in some class like in Object class every time the new minified version of css and js is created. The script will then create correct paths to minified scripts when added them to web page. This is the most efficient way for end-users, not the easiest for developer.

Reload Viewer when on Settings page

When Viewer visits settings page the Settings controller should reload the Viewer object. This way the user role will be updated. Otherwise if user is not activated but then received the activation link and activated account but using different browser, the stale User object will cause the problem - user will keep seeing "unactivated email" message with the link to receive activation code

Write own loading mask function for js

Stop using AUI loading-mask, it interferes with auto-complete.
In general all AUI widgets from YUI gallery suck. AUI never ever replies to any support requests.
They wrote tons of widgets, I have not yet seen a single one that just works with YUI 3.3

Add tooltip widget

Add tooltip widget. It will generate tooltip for mousever over elements with ttt class
and will use value of title of the element and will parse it with mini markdown

Add "Thank you" link

Add small link under question called "Thank you" so user can just thank the answerer. This is not the same as selecting the best answer and not the same as casting a vote but it can still increase reputation by 10 points when user receives a thank.

The question is - who should be able to thank people - only question owners or other users too? If we limit to only question owners that would be used to few times that its not worth it.

Receiver of the Thank you should be notified - definitely.

Add Question info block

Add block to Viewquestion template that would show tags with tag cont,
added time and last modified time in relative time and also show views count.
Tags should have the same "class" style as normal tags so that later can add some js events to show more details about tags like asking to follow tag or add to interesting tags or see wiki entries about tags

Add "Close" feature

To add controller to "Close" question.
Moderators should be able to close right away. No need to actually do the "Vote to close" because most sites don't have dozens of moderatos to cast votes....

Must also have "Reopen" to go with it to just remove the "Closed" Anyone could request a "Reopen", moderators will be notified and decide if to reopen it. Should keep track or "Reopen requests" to prevent same user from pounding on the reopen link

Change Search button to split-button

Make Search button a split-button with options in drop-down to search by Tags or Title/body
Also add tip on mouseover to search button to hint how to search for ALL tags by simply quoting tags

Add per question "activity array"

This is just an idea, have to thing about it more...
Add array of "activity' record to QUESTION document as nested array.
For example ['john added new comment', 'Jena started following this question', 'Mike edited answer']
It may be helpful to show latest activity on the question page, especially since some activities like added new follower do not affect the actual content of the Question or any answers, this is the only way to say that something new happend in that question. Otherwise some users will be clueless as of why their 'read/unread' status has changed but now new content appeared in question.

Maybe the entries will not not just text files but arrays of timestamp and text
also text may be in the form of html fragment like it may include a like to user's profile.

Add search form

Add search form and use full text title search from MySQL but if MySQL not available we must show some message or not add search form at all. No reason to also search in Question tags

In the future we will have full text search engine probably lucene and then can index full questions, titles and answers as well as update the search datastore when Question status changes and when count of answers is changes as well as update last-update timestamp.
This will be done via custom event listener and using register_shutdown_function

Utf8String for comments

The SubmittedCommentWWW must return object of type Utf8String
then validator could use length() method on the object to get
the correct string length of utf-8 string.
Also run in through make clickable

Ability to add Twitter, Facebook to existing account

This has to be on profile page, buttons to link Twitter and Facebook to
accounts that don't already have them linked.

Maybe a special callback url for Twitter oauth for this action? Is this also possible for facebook - a unique url for that?

Sticky thread

Make it possible to stick question (thread), with support for priority
Then add 'stick' or 'unstick' links to question when viewer is administrator
and add 'make_sticky' to acl for administrators. For now just make it a direct link to a=stick&qid=$qid later can add support for priority

External Auth and No Email

Special case: use joined with FriendConnect or Twitter and did not provide email address by clicking on the "edit" from the modal window that asks for email address.

Now user does not have email address at all. On the "Settings" page we should display a special
div with a message asking to complete step 2 of registration which will then bring up the modal windows with step2

Also the "Change password" form should not be shown and instead that special div should be show, telling user that we don't have your email address and you have not picked a username yet and that it would be impossible to login or to recover lost password in the future.

This can be done by throwing exception or by returning different html block instead of change password form.

Make the "Most voted" sorting link work

Make the link on Answers block "Most voted" to actually work - get block of answers via Ajax and replace the answers block with it and then call "relative time" JS after it's been loaded

Add "Relative time" javascript

Add Javascript to convert post dates to relative time like "Time ago"...
It will be more efficient to do this on client side than on server side

Add "Following block" to Tag/Question/User info page

Add block with divs that display avatars of users who are following that particular tag. The images should always be loaded via ImageLoader as backgrounds.
Images will be set to size of 40x40, divs will be set to 40x40 also. A browser that does not
support the css width of background image will just cut-off 8 to 10 pixels off the left and bottom of the avatar.
The divs must float to left to auto-align in rows.
Maximun of about 30 images will be displayed and if there are mo followers than extra page to show all followers should be made, for example /followers/tag/$tag or /followers/user/234/

The method to create the avatar images should be defined in template as a function to use internal avatar if exists, then try external and then fallback to gravatar.

These div will have mouseover triggering the display of tooltip (from gallery -> AUI) the data is taken from div's title, as usual. The data will have tiny markup - * indicates bold and | indicates line break.

For this we need to write tiny markup parser, which could later also be used in comments block for some font decorations like bold and italic.

On User profile pages we can also ad followers block as well as following.

Need another Exception class

Need AlertException Exception. It will be used by all exceptions that should still be shown to end-user but not result in error logging. Admin does not have to be emailed every time some user sees alert because his reputation score does not allow them to comment.
Can replace the existing Exception with new one on the Addcomment controller, for example

Create installer

Create installer script. It will check for required stuff, create mysql table, create USERS table and insert admin account. It will ask user to enter username, password and email address of admin user. It will also not work if admin already exists.

Join with account you already have

Small bug: if none of external auths are enabled, then "Join with account you already have" should not be shown in the "form" block when user not logged in, as well as not show on the quick reg modal.

Work on I18N class

Write I18N class based on Mongo. Collection will have string as _id, then object of lang=>string
Then when looking for string we select all translations, if requested lang key not found, then use default lang, if default lang not found (usually this means the findOne will return empty) then use string key itself, replacing _ with space and uppercasing first word. Lang keys should be line 'en_US' or just 'en', not really sure yet.

Add Gravatar support

If user does not have avatar and does not have external avatar then use gravatar. This will replace default user icon.

user banning in userinfo page

When admin or moderator views user profile, 2 forms will be added under user reputation:

  1. change user's role via drop-down + submit button

  2. Delete all posts by user

  3. ban user ips - find all ips used by user and add them to banned ips collection.

All-in-one ban+delete+banIPS is a special red button called "user shredder" that will do all these things with one button push.

Write "flag" controller and JS interface

JS interface should open small form asking to select "offensive", "spam", "other" and add textarea for a comment. It will be sent via Ajax to controller.
Controller will send out emails to admins/moderators, record issue in some collection and send out response.
Text of response should replace the content of Alerter which was showing the form before...

Move Points constants to user config class

Move Points.php to root dir and originally release it as Points.php.dist
then user can rename it and edit as per user needs. IT will still have the same constants as before.
For this to work we must add extra line or two to SplAutoloader to find this one class in root dit, even though it belongs to Lampcms namespace.

Include Points and ReputationAcl classes in that one file.

Dot Folders

Implement issue similar to vbulletin's famouse dot folders where a special visual effect is
applied to question divs for questions in which the viewer participated either as original asker of supplied one of the answers or commented (but commented only on a question?) in Questions list pages.

Add support for code editing

Bring back support for code editor and code highlighter buy only if this option is enabled in config.
This would load extra 2 JS files to question view page and to "Ask" page
and will set extra meta for Ask page which will then be used in qa.js to add support to YUI Editor to enable code editing tools.

On the server everything is already enabled to parse code tag, but must test it thoroughly just to be sure it works.

Fix issues with utf8 tags

Figure out the issue why Mongo regects utf8 tags but allows utf8 in title and body
and then fix it.
After fixing the issue with Mongo figure out the best way to use utf8 tags in urls. Probably the best thing would be to store urlencoded values as well as actual values in the database.
We store pre-parsed links to tags anyway, so just urlencode() them

then always urldecode() on server

Dont show deleted items in default view

Stop showing deleted items, even to admins.
There will be a separate controller to that /viewdeleted/
where it will show all deleted questions if viewer is admin.

Create Users page

A page to see all users with some 'sort by' tabs.
Do this similar to how it's done to view answers for a question: sort tabs only for JS enabled, download stuff by ajax, cache first pages of tabs.
Pagination will work with or without JS.

Simple divs with images, usernames, reputation score, similar to tags view but mada in layout1 and about 90% width with some border.

Do we need extra type of i_lm_ts for Question?

When a vote is added for an answer to a question, that should affect the etag value, otherwise
user will not see the new version of the question page.
But just adding vote to an answer or to a question itself or even when the best answer is selected should not update the i_lm_ts because then the question moves up in the home page.

So there has to be another field similar to i_lm_ts which would be updated every time i_lm_ts is updated but also updated with some minor changes are made to a question that should not really affect the i_lm_ts but should affect the value of cache etag.

Some type of i_etag.
It probably does not even have to always exist, only during the first update of i_tm_ts or its own first update will it be created. It does not have to be indexed.

Look into local storage and Local database browser-based messaging

Use Browser's local storage and maybe even Local database for storing site messages and keeping track of viewed questions. uid | qid | timestamp
The values of lampcms:i_etag are already on pages we can use them to find read/unread messages and mark them as read/unread

Add onProfileEdit and onAvatarUpload events

Add these events. May also runLater() to update all user's Question and Answers with new avatar path and new Screen names
Try to use update ALL in Mongo to update multiple records at once that match i_uid

Unable to click on link inside autocomplete hint div

The autocomplete element in the "Ask" form for title has links but clicking on these links is impossible because clicks are treated as selection of the autocomplete suggestion.
Look into using some event of autocomplete widget to redirect to link url if target of click was actually a link

Look into dnd cooke setting

When user exits from step 2 of Join - does not want to enter email address, we set the dnd cookie (do not disturb) so that the same popup does not open again.

Must make sure that this dnd is not set from just regular quick reg block because if user just closes the quickreg modal and sets dnd cookie then the step 2 of external auth login will never be shown to that user. So either do not set the dnd cookie from regular quick reg modal OR set expiration of about 7 days for this cookie to periodically nag the user to complete registration or both.

Check Bodytagger

Make sure that tagged words are replaced only on word boundry and never when they just part of longer string. This may also be a problem with the word is part of the title of the url.
In such case it should not be replaced by tag, but can be wrapped by the tag.

The best thing to do is to probably do this function using DOM parser. A Linkification is also much better done inside the DOM parser!

Edit profile

Need a controller with form processing to edit profile. Make editable fields Fist name, Middle name, Last name, url, bio (description, will even contain RTE, will have max text of about 1000 chars.)
Later will have upload avatar field right there.

"Connect" buttons to add Twitter, FB may be on the same page, but not sure yet.

Work on comments feature

Need to store comments under the QUESTION or ANSWER object as or as objects. Storing as array allows taking advantage of just pushing into Mongo, very easy. Store comments_count as separate field in collection. Also generate resource_id for comment and store then in each comment object as well as in separate collection that will map comment_id to question_id or answer_id as well as store the type of comment QUESTION or ANSWER, so that we know if which collection to look for it. Knowing just the commendID we can get collectionName and id or question or answer, the get all comments and then finally get that one comment.

Should also limit number of comments per resourse to about 50. This way it will not grow to such a size that it will impose memory problem because we will have to select all comments in many cases when we need to find specific one like for editing or for deletion

Add "reply" to comment feature

Must be a way to click on a "reply" link in the comment. Comments should have "reply" links
the comment form will be appended under that comment.

The value of parent_id will be passed to parser and recorded in the comment object.
That value will then be added to the html as either extra class like prnt_1234 and extra class c_reply will be added to the html of comment div so we can visually indicate that this a a reply.

Mouse over that comment div will highlight the div with parent comment.

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.