Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Discussions in Progress
dfareed
New
Now for sure this wouldn't be standard, but I am integrating vanilla into a magazine's website and would like to have an include for the front page or iframe with a brief list of ongoing/most recent threads.
ala http://www.giantstep.net/ (upper right hand corner).
Would this be hard to do?
Any tips before i start digging through the code would be freaking awesome.
ala http://www.giantstep.net/ (upper right hand corner).
Would this be hard to do?
Any tips before i start digging through the code would be freaking awesome.
0
This discussion has been closed.
Comments
You don't really need to dig through the code.
I use a fairly complex set of objects to build the pages, and any system you're integrating with wouldn't have access to those objects. So, you'd either need to:
I would highly recomment the latter, since the former could probably only be pulled off by me (at this point). I can give you a sample query if you want, then all you'd need to do is make a php file that pulls and displays that data and include it in your page wherever you want.
from LUM_Discussion d
left join LUM_User u on d.AuthUserID = u.UserID
left join LUM_User lu on d.LastUserID = lu.UserID
left join LUM_Category c on d.CategoryID = c.CategoryID
where d.Active = '1'
and d.Closed = '0'
and (d.WhisperUserID = '0' or d.WhisperUserID = 0 or d.WhisperUserID is null )
group by d.DiscussionID
order by d.DateLastActive
desc limit 0, 10
So I used Mark's feed script to get this working:
Download File (zip with one file)
Functionally it's nearly identical to the feed script. You no longer need to select which type of feed you are looking for. To view the file in your installation you must be either logged in or have an open installation (makes sense - you don't want to display the contents of a private vanilla). Whispers are also kept clear of this.
To modify the way this displays:
-line 185 limits the number of entries displayed. This is the same as the number of entries displayed in the RSS, so if you want to keep the RSS unchanged, just change "agDISCUSSIONS_PER_FEED" to some number (10? 4? whatever, but leave the rest of the line as is).
-line 198 displays text for when no messages have yet been posted to vanilla.
-line 202 is a header (can be deleted)
-lines 207-219 format the display of information related to each thread [title, link, authorname, authorurl, publish date, updated/last comment date, summary(body with no formatting), category, categorylink, and content (body w/ formatting)]
I have only tested this with vanilla .9.2 (version w/feeds) but am pretty sure it won't work with previous versions.
this isn't a replacement for the feeds. it's sort of a hack for the purpose of including recent discussions elsewhere on a site (not managed by Vanilla).