Vanilla 1 w/ Scene 1.0 style: http://autolux.bigfatgun.com/
It's ostensibly for information about a band out of L.A. named Autolux, but given the lack of news it's anarchy.
Hey guys, I'm the author of The Beautiful Lie, saw this discussion from my refers. Thanks for the praise. =] While I'm not sure what it takes to submit an official theme, the only thing you would need to modify on your own theme to have "blog style" discussions is the comments.php file. Add this after '<div class="CommentHeader">':
if ($RowNumber == 2 && ($_GET['page'] == '' || $_GET['page'] == 1)) {
$CommentList .= '<h2>Comments</h2>';
if (!$PERMISSION_SIGN_IN) {
$CommentList .= '<div style="margin-top:-10px;">To leave a comment,
you need to <a href="'.$this->Context->Configuration['SIGNIN_URL'].'?ReturnUrl='.GetRequestUri().'">sign
in</a> first.</div>';
}
}
After that, you just have to mess with the roles to make it so that as soon as someone applies for membership, they get "sign in" and "post comments on existing discussions" access.
The front page is kind of a hack. In index.php:
if (count($_GET) > 0) { // If there are GET variables, do like you normally would do
// This block of code is what was there initially
$DiscussionGrid = $Context->ObjectFactory->CreateControl($Context, 'DiscussionGrid');
$UpdateReminder = $Context->ObjectFactory->CreateControl($Context, 'Filler', 'update_reminder.php');
if ($Configuration['ADDON_NOTICE']) $AddOnNotice = $Context->ObjectFactory->CreateControl($Context, 'Filler', 'addon_notice.php');
$Page->AddRenderControl($UpdateReminder, $Configuration['CONTROL_POSITION_BODY_ITEM'] - 20);
$Page->AddRenderControl($DiscussionGrid, $Configuration['CONTROL_POSITION_BODY_ITEM']);
} else { // Otherwise if you're at the root domain
$FrontPage = $Context->ObjectFactory->CreateControl($Context, 'Filler', 'front.php');
$Page->AddRenderControl($FrontPage, $Configuration['CONTROL_POSITION_BODY_ITEM']);
}
And then I made a front.php file that goes in the selected theme directory which I update by hand.
Haha, thanks bugsmi. The email updates form is my own code that makes an ajax call to a simple php script. The Javascript for the form submission can be found here. It depends on prototype and scriptaculous.
Hi folks, I've tried clofresh's blog-like hack, and all I get is the following error when I click on a discussion: Parse error: syntax error, unexpected T_STRING in ../vanilla/themes/comments.php on line 76 Line 76 is this one: if ($RowNumber == 2 && ($_GET['page'] == '' || $_GET['page'] == 1)) {
I suppose I forgot something obvious... Does someone have an idea about this?
Oh, when you put that block of code after <div class="CommentHeader">, you have to finish that string first:
Here's what the lines around it looks like:
$CommentList .= '<li id="Comment_'.$Comment->CommentID.'"'.($CommentClass == ''?'':' class="'.$CommentClass.'"').'>
<a name="Item_'.$RowNumber.'"></a>
<div class="CommentHeader">';
if ($RowNumber == 2 && ($_GET['page'] == '' || $_GET['page'] == 1)) {
$CommentList .= '<h2>Comments</h2>';
if (!$PERMISSION_SIGN_IN) {
$CommentList .= '<div style="margin-top:-10px;">To leave a comment, you need to <a href="'.$this->Context->Configuration['SIGNIN_URL'].'?ReturnUrl='.GetRequestUri().'">sign in</a> first.</div>';
}
}
$CommentList .= '<ul>
<li>
'.($ShowIcon?'<div class="CommentIcon" style="'."background-image:url('".$Comment->AuthIcon."');".'"> </div>':'').'
<span>'.$this->Context->GetDefinition('CommentAuthor').'</span><a href="'.GetUrl($this->Context->Configuration, 'account.php', '', 'u', $Comment->AuthUserID).'">'.$Comment->AuthUsername.'</a>';
// Point out who it was whispered to if necessary
etc.
Comments
is that email updates form a part of Vanilla ?
i need an idiots interface for I was not born with a coded tongue ;-)
why not just use phplist that rocks
Bevo Sports Forums
A pet project of mine
Parse error: syntax error, unexpected T_STRING in ../vanilla/themes/comments.php on line 76
Line 76 is this one:
if ($RowNumber == 2 && ($_GET['page'] == '' || $_GET['page'] == 1)) {
I suppose I forgot something obvious... Does someone have an idea about this?
Any chance you could post somewhat more detailed instructions?