• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Digital Point Spy

Status
Not open for further replies.
If you edit the js/digitalpoint/spy.js file and change "feed" to "/feed" it should work... Stupid URLs. lol

Will upload a new package in a sec, but that's the only change.
 
To add to the not found bug, if I navigate to /spy/feed it displays the feed with no formatting, so I guess that works!
 
If you edit the js/digitalpoint/spy.js file and change "feed" to "/feed" it should work... Stupid URLs. lol

Will upload a new package in a sec, but that's the only change.
You also need to change &last to ?last for it to work. So change /feed&last to /feed?last
 
I tried that change and it made no difference, just adds two // to the URL.

Edit: That got it James.
 
Yeah... working on something for the last=xx already... a little annoying since people without the .htaccess setup for URLs need it to be &... while people that do need it as ?...
 
Just made the edit and I'm still seeing nothing appearing. I can't link to the page because I'm testing it on off-line localhost install.

Edit: Just tried the same with /feed added on path and same as others happens. It shows it with no formatting.

Snap1.webp
 
Hovering over a forum or thread title in the feed, just shows the forum node ID or the thread ID in the URL bottom left of the browser, rather than the forum or thread title.

Is that intentional?
 
Yeah... working on something for the last=xx already... a little annoying since people without the .htaccess setup for URLs need it to be &... while people that do need it as ?...
PHP:
if(XenForo_Application::get('options')->useFriendlyUrls){
// you need a question mark
} else {
// you need an ampersand
}

The only problem, of course, is that it's in the JS not the PHP that this problem occurs! Eek.
 
So glad this is finally up and running Shawn - thank you, I'm sure you'll iron out the kinks :)
 
BUG: Deleting the first post (which is effectively deleting the thread) then deleting the thread after results in a blank thread title.

To reproduce (ensure spy is loaded):
Soft-delete the first post in a thread
Navigate to thread listing and hard-delete the thread.

Result:
deletedbug.webp

Also, you should probably put what forum the thread was deleted from in the Who / Where.
 
James - the problem is you can't call XenForo_Application from JavaScript (which is where it needs to happen)... there probably is a method somewhere in JS that does the same thing, but I didn't feel like looking for it (and it might not exist), so I just did it myself. Anyway... the new upload (100b) will work regardless of your friendly URLs setting.

mrGTB - you can just download the updated version and grab the JS from it... it was the only change.

Brogan - It's intentional... the URLs are not spiderable by a search engine since they are coming in via AJAX/JavaScript. Mostly didn't want to mess with the extra overhead for generating them. But I suppose it's really not THAT much overhead...
 
If it's soft deleted it should show the forum/title... but internally it doesn't track the contents of title, location, etc... it's getting that info via a join to the record. But if the record doesn't exist, you wouldn't end up with much data (soft deletes should show the info still since they actually still exist internally).
 
If it's soft deleted it should show the forum/title... but internally it doesn't track the contents of title, location, etc... it's getting that info via a join to the record. But if the record doesn't exist, you wouldn't end up with much data (soft deletes should show the info still since they actually still exist internally).
The problem might've been that I soft-deleted the first post in the thread that actually results in the thread being soft-deleted. This'll log as a deleted post, but it's really a deleted thread. Perhaps a check to see if it's the first post?
 
Also what's the deal with the "XenForo Spy by Digital Point"? Is it removable or does it have to remain intact? (I have no plans to remove it, just figured it should be answered)
Just to follow up on James' question, will you be offering a branding-free version?
 
The problem might've been that I soft-deleted the first post in the thread that actually results in the thread being soft-deleted. This'll log as a deleted post, but it's really a deleted thread. Perhaps a check to see if it's the first post?
Well for the deletion events, we are really just piggybacking XF's moderator log... so if XF logs it as a deleted post in it's moderator log, that's what it will show up as in the Spy.
Just to follow up on James' question, will you be offering a branding-free version?
Maybe someday, but don't really have a setup to really allow it, so not at the moment.
 
Can I make a suggestion?

In DigitalPointSpy_ControllerPublic_Spy::actionFeed() you have this:

PHP:
foreach ($items as $item)
{
// control the template for each item
}
 
echo json_encode($output)

It'd be much easier to change the style of the spy if, instead, you just did this in the spy_index template:
HTML:
<ol class="discussionListItems">
<xen:foreach loop="$items" key="$item">
<xen:include template="spy_item">
</xen:foreach>
</ol>
then create a template named spy_item and put all of the foreach inside it (well, just the $output[$item['spy_id']] really).

Suggestions? :)
 
I updated the download (again... sigh). The "100c" version has a new ControllerPublic/Spy.php file, which gives "friendly" URLs in the feed.
Can I make a suggestion?

In DigitalPointSpy_ControllerPublic_Spy::actionFeed() you have this:

PHP:
foreach ($items as $item)
{
// control the template for each item
}
 
echo json_encode($output)

It'd be much easier to change the style of the spy if, instead, you just did this in the spy_index template:
HTML:
<ol class="discussionListItems">
<xen:foreach loop="$items" key="$item">
<xen:include template="spy_item">
</xen:foreach>
</ol>
then create a template named spy_item and put all of the foreach inside it (well, just the $output[$item['spy_id']] really).

Suggestions? :)
The problem with that is the feed has up to 25 UNIQUE objects in it... each individual feed line has to be isolated/treated differently because they aren't all instantly injected at once... it inserts them one at a time.

So you would need to loop the full renderer up to 25 times, render each individual line, then drop them into an array so they can be kept separate. And that is actually how I wanted to do it... unfortunately I got tired of trying to figure out how to get the renderer to return it's output as a string so I could do exactly that. Either way, the spy_item template would have to be it's own thing and not able to do a foreach loop within it since we need each line to be it's own object.
 
Shawn, this is epic! I have been waiting for this for ages.

I'd love to see it mention things in a more organic manner though.

Like, if I follow a user, I'd love it to say something like:

Your friend Steve just posted a new discussions: title.
Bob replied to a thread: title
Three new people started following you.
Susan uploaded a new avatar, check our $gender[his/her] profile.
You've just received a new personal conversation from Steve.
A new member registered just now, come say hi.. (profile link)
Bob received a trophy for coming back to the web site.
Moderator Carl just soft deleted a post (you're a mod, go have a look).

stuff like that.

I'd love to just have the page open while I am working on the site, it connects people a lot faster.

One thing I am considering is to just make this the frontpage of the site, rather than having a portal.

And to be honest, because my sites are not huge, I have no problem if they have 12 or 20 or 30 queries to achieve this. A lot could be put in a separate database, cached, and perhaps updated via a crontab - so it's less 'real time' - especially for guests, vs members, vs moderators.
 
Status
Not open for further replies.
Top Bottom