kevinjardine / shoutout Goto Github PK
View Code? Open in Web Editor NEWAllows adding content (possibly with file attachments) directly to the river
Allows adding content (possibly with file attachments) directly to the river
This looks to be the best tool for this: https://github.com/jmrware/LinkifyURL/blob/master/linkify.js (or the PHP version)
The author seems to be a regex expert: http://jmrware.com/articles/2010/linkifyurl/linkify.html
I'm not sure if it's every file, but there are many file_get_contents warnings when attaching a file to a shoutout:
PHP WARNING: 2012-02-16 16:13:17 (EST): "file_get_contents(/var/www/Elgg-data/2012/02/06/921/attachments//thumbBHPFC LOGOinvert.jpg): failed to open stream: No such file or directory" in file /var/www/Elgg/mod/shoutout/models/model.php (line 427
When a shoutout is deleted, content is pulled via AJAX from "/shoutout/activity_river_view", however the page/components/list
view is not passed a "baseurl", so it assumes "/shoutout/activity_river_view" is the URL the user is sitting on and generates incorrect links.
The hard part is getting the originating URL inside the AJAX response handler. One way is to append the current URL to the delete action link via the querystring (right before the AJAX call is made) so it could be read by your shoutout_get_activity function, which could then pass that to elgg_list_river as $options["baseurl"]
.
Simply give a link to the poll, not the list of options.
Currently only the preview thumbnail is linked.
Please include the filename inside the A element and add .shoutout-attachment-image {vertical-align: middle}
to the CSS so that the text is centered with the thumb.
You can see here the layout I gave shoutout for our COE site. Took quite a bit of CSS wrangling since I didn't want to override the view. I think this would be a better default layout.
Thoughts? Splitting the layout into several views would certainly help.
It should at least give a link to the poll I'd think, but if it's just as easy to display the usable poll, that's fine w/ me.
There is a javascript error keeping IE9 from uploading a file to a shoutout.
Hello Kevin,
This is Naveen with the College of Education. Univ of Florida.
Was doing some testing with the Shout-out plugin for Smartstart and came across these things.
Bug 1: When you "copy paste" a large text into the shout out area, the character limits read negative ( eg -98 characters left)
Though mathematically correct, it would be good to display "You have exceeded the character limit, text will be truncated"
Bug 2: After a copy paste of large text, i am able to submit the entire content ( > allowed character limit ) - and its posted to the server. No truncation is done.
I think this behavior must be modified to give a user a message that the text will be truncated and the text must actually be truncated to the allowed limit
Feature Req: When a long shout out wraps on the river page, users see a ( ... ) three dot and the message is truncated. Users of smartstart reported that they did not know how to see the full content. Unless you know that clicking on the "time-stamp" leads you to the full post, its difficult for a regular user
Could you please add a "more" link for the truncated shout-outs -clicking which will have the same effect as clicking the time-stamp link in the shout-out heading
Currently these are sent but assume that the object has a title and have an incorrect URL.
Eg.
You have a new comment on your item "" from Stephen Clay. It reads:
Comment left from shoutout page
For every file we attach to a Shoutout, we get a corresponding entry in the Apache error logs:
PHP WARNING: 2012-02-16 20:24:55 (EST): "finfo_file(): File or path not found 'SantaHelpers.JPG'" in file /var/www/Elgg/mod/shoutout/models/model.php (line 512)
After uploading an attachment to a shoutout, the path to the icon is:
mod/file/graphics/icons/application.gif
instead of:
/mod/file/graphics/icons/application.gif
Place the tabbed filter just below the SELECT filter. That way with a little negative margin we can position them on the same horizontal line.
Just brainstorming here...
I'd think a script to migrate wire posts to shoutouts would be straightforward. Cron could take on a chunk of the newest wire posts at a time until they're all done, with an option to remove or leave the originals.
I wonder how hard it would be to have this plugin take over the display of existing the_wire objects so migration was not necessary? Just overriding the_wire river views so they look the same I think would be easy enough, but the subtype filtering code would get a bit more complex (e.g. to only show return shoutouts and wire posts).
Replace the [Vote] button with "Thank you for voting!", leave the selected OPTION selected and set the disabled
attribute on the others.
(just a suggestion we've already implemented on our side)
We applied a plugin hook handler for "view", "river/elements/body" with this code inside the handler:
if (isset($params['vars']['item'])) {
$item = $params['vars']['item'];
if ($item instanceof ElggRiverItem) {
/* @var ElggRiverItem $item */
$entity = $item->getObjectEntity();
if (elgg_instanceof($entity, 'object', 'shoutout')) {
$url = $entity->getURL();
$returnValue = preg_replace_callback(
'@(<span class="elgg-river-timestamp">)([^/]+)(</span>)@',
function ($m) use ($url) {
$link = elgg_view('output/url', array(
'href' => $url,
'text' => $m[2],
));
return $m[1] . $link . $m[3];
},
$returnValue);
}
}
}
This uses an anonymous function, but you can pull that out to a global function for 5.2 compat.
Hold off on this for now, but I can see users wanting this. Above the comments box on the shoutout item page, add one of the two following paragraphs:
E-mail me when people comment on this? Yes (set to No)
E-mail me when people comment on this? No (set to Yes)
These action links would control metadata on the shoutout: $entity->is_subscribed_to_comments
. If the metadata is missing, assume it is 1.
This plugin is very usefull but im having some troubles with the thumbnails on image attachment:
I've inspected the link, the content, and headers and still working fine, ive download files directly from elgg cache and seems to be good.
But i can't make to show this file as an inline content on my platform.
Instead place this message at the top:
Log In to post your own Shoutout.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.