I'm pretty new to Drupal, just migrated from Joomla. (Best decision of my life.)
For the most part, I have my site configured the way I want, but I want to have a Microblog setup for my users (Facebook status, Twitter, etc.)
I've tried using dodge, but for the life of me, I can't figure it out. So, I'm developing my own solution based off Activity, Tokens, and basic content updates.
Concept: Create node type "Status" available to all users. Key in activity on "Insert new Status": [user-link] is "whatever". Create block above user menu with "You are:" TEXTFIELD
Problem: How to link textfield contents to programatically add content to the Status type on submit.
Every other sequence works, I've tested it out by manually adding content, I'm just stuck on that form.
Is there a module that can add content in this fashion, or am I better off manually coding this in?
If the latter, how can I get started? I don't quite understand the "hooks" in the api, any help is greatly appreciated.
It should be noted that I'm trying to implement a social network type website for a college, whose semester begins mid-week next week. I would love if I can get any support before that time, I'd really like to roll this feature out on launch.
Thank you all in advance! I look forward to working with everyone in this community.
Comments
Solved!
Well, I figured out this problem. For anyone actually trying to do the same thing, here's the method I used. I personally think its a bit easier than learning dodge, which i STILL don't get, so... excuse my novice understanding of drupal, when I get more used to the system, this will probably be more advanced.
Modules Used:
Activity
Buddylist
Node_Factory
For conflictless display, make sure JQuery is up to date:
Jquery_Update
Step 1
Create a new content type called "status". I used "dodge" because, well, I was trying to get that to work. Disable comments for this type, and do not promote to frontpage. You may or may not want to sticky this on top of lists, depending on how you want this type to display.
Step 2
Make sure the Activity module is enabled, and the block is positioned where you want it on screen. Create a new block called Status, set the input type to PHP, and position it under the Activity block.
Step 3
In the Status block, enter this code:
Step 4
Go to your activity preferences, enable buddylist tracking and nodeapi tracking. Under the Token section, expand the nodeapi and in "insert Status", enter
[user-link] is [node-title].Since this was made to emulate facebook's feed function, I recommend going into the buddyapi section and adding
[user-link] added [buddy-link] as a friend.as well as[user-link] wrote a new (content here): [node-title-link]in the Node API.This was very roundabout, and can probably be accomplished with a module easily, but as of now, I don't know how to create my own module. Hope this helps someone!
Oh, and a side note, the status is saved solely as a title. status is automatically prefixed with "Username is" from the Activity module, but the title remains solely what was entered into the text field. I'll probably get around to entering everything as a full string, but for now, thats how it is. If you want to track user status, I'd recommend making an RSS feed of the buddy activity rather than track status updates through the drupal system.
If anybody would like to help me turn this into a module, I'd love to hear your input!