MyBB Community Forums

Full Version: Advanced Sidebox 2.1.1
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi jaa09,

If ASB isn't showing up on the plugin list then you haven't copied the files to the correct location.

You need to copy everything inside the Upload folder (but not the Upload folder itself) into your forum's root (ie. yourforum.com/ <-- there)-- sometimes in FTP this is called public_html or www folder.

I hope this helps.
is this my bad html or something else ?
[attachment=29199]

perhaps I have not closed a table ?
I couldn't say from looking at the screen shot, but if I could see the HTML output of that page I could possibly determine the problem.
(2013-05-04, 07:13 PM)Wildcard Wrote: [ -> ]I couldn't say from looking at the screen shot, but if I could see the HTML output of that page I could possibly determine the problem.

here is forumdisplay_threadlist
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
	<tr>
		<td class="tbar" colspan="{$colspan}">
			<div class="float_right" style="margin-top:-3px">{$multipage}</div>
			<div><strong>{$foruminfo['name']}</strong></div>
		</td>
	</tr>
	<tr>
		<td class="tcat" colspan="3" width="66%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=subject&amp;order=asc">{$lang->thread}</a> {$orderarrow['subject']} / <a href="{$sorturl}&amp;sortby=starter&amp;order=asc">{$lang->author}</a> {$orderarrow['starter']}</strong></span></td>
		<td class="tcat" align="center" width="7%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=replies&amp;order=desc">{$lang->replies}</a> {$orderarrow['replies']}</strong></span></td>
		<td class="tcat" align="center" width="7%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=views&amp;order=desc">{$lang->views}</a> {$orderarrow['views']}</strong></span></td>
		{$ratingcol}
		<td class="tcat" align="right" width="20%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=lastpost&amp;order=desc">{$lang->lastpost}</a> {$orderarrow['lastpost']}</strong></span></td>
		{$inlinemodcol}
	</tr>
	{$selectall}
	{$announcementlist}
	{$threads}
	<tr>
		<td class="tbar" align="right" colspan="{$colspan}"><div class="float_right" style="text-align: right;">
	{$inlinemod}
	
</div>
			<form action="forumdisplay.php" method="get">
				<input type="hidden" name="selectall" value="" />
				<input type="hidden" name="fid" value="{$fid}" />
				<select name="sortby">
					<option value="subject" {$sortsel['subject']}>{$lang->sort_by_subject}</option>
					<option value="lastpost" {$sortsel['lastpost']}>{$lang->sort_by_lastpost}</option>
					<option value="starter" {$sortsel['starter']}>{$lang->sort_by_starter}</option>
					<option value="started" {$sortsel['started']}>{$lang->sort_by_started}</option>
					{$ratingsort}
					<option value="replies" {$sortsel['replies']}>{$lang->sort_by_replies}</option>
					<option value="views" {$sortsel['views']}>{$lang->sort_by_views}</option>
				</select>
				<select name="order">
					<option value="asc" {$ordersel['asc']}>{$lang->sort_order_asc}</option>
					<option value="desc" {$ordersel['desc']}>{$lang->sort_order_desc}</option>
				</select>
				<select name="datecut">
					<option value="1" {$datecutsel['1']}>{$lang->datelimit_1day}</option>
					<option value="5" {$datecutsel['5']}>{$lang->datelimit_5days}</option>
					<option value="10" {$datecutsel['10']}>{$lang->datelimit_10days}</option>
					<option value="20" {$datecutsel['20']}>{$lang->datelimit_20days}</option>
					<option value="50" {$datecutsel['50']}>{$lang->datelimit_50days}</option>
					<option value="75" {$datecutsel['75']}>{$lang->datelimit_75days}</option>
					<option value="100" {$datecutsel['100']}>{$lang->datelimit_100days}</option>
					<option value="365" {$datecutsel['365']}>{$lang->datelimit_lastyear}</option>
					<option value="9999" {$datecutsel['9999']}>{$lang->datelimit_beginning}</option>
				</select>
				{$gobutton}
			</form>
		</td>
	</tr>
</table>
<div class="float_left">
	<div class="float_left" style="padding:10px">
		<dl class="thread_legend smalltext">
			<dd><span class="thread_status newfolder" title="{$lang->new_thread}">&nbsp;</span> {$lang->new_thread}</dd>
			
		</dl>
	</div>

	<div class="float_left" style="padding:10px">
		<dl class="thread_legend smalltext">
			<dd><span class="thread_status lockfolder" title="{$lang->locked_thread}">&nbsp;</span> {$lang->locked_thread}</dd>
		</dl>
	</div>
	<br style="clear: both" />
</div>


<br style="clear: both" />
{$inline_edit_js}
here is forumdisplay_subforums
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="border-radius:0">
<tr>
<td class="thead" colspan="5" align="Left" style="border-radius:0"><strong><navigation></strong></td>
</tr>
<tr>
<td class="tcat" width="2%">&nbsp;</td>
<td class="tcat" width="59%"><span class="smalltext"><strong>Areas</strong></span></td>
<td class="tcat" width="7%" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}</strong></span></td>
<td class="tcat" width="7%" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_posts}</strong></span></td>
<td class="tcat" width="15%" align="center"><span class="smalltext"><strong>{$lang->forumbit_lastpost}</strong></span></td>
</tr>
{$forums}
</table>
<br />

hope that is enough templates to look at
one other point how come sideboxes are not displayed on forumdisplay when the output is only one category if you add a second cat it works as expected
^That is good for me to test the template modification code on but what I meant was the actual output (View Source) of that page so that I can check the comments output by ASB-- and to see exactly what is being done.

You can PM me that info if you like.
(2013-05-05, 06:04 PM)Wildcard Wrote: [ -> ]^That is good for me to test the template modification code on but what I meant was the actual output (View Source) of that page so that I can check the comments output by ASB-- and to see exactly what is being done.

You can PM me that info if you like.

sent PM ...
how about the other point when the side boxes are not displayed on forumdisplay ??
Link to example
FYI -> The reason this does not work with pagemanager is that rather than call a template, pagemanager instead calls the template in a hardcoded way

function pagemanager()
{
	global $mybb,$cache;
	$pagecache=$cache->read('pages');
	if($mybb->input['page']&&isset($pagecache[$mybb->input['page']]))
	{
		global $db;
		$query=$db->simple_select('pages','*','pid='.$pagecache[$mybb->input['page']]['pid']);
		$pages=$db->fetch_array($query);
		if($pages['framework'])
		{
			global $headerinclude,$header,$theme,$footer;
			$template='<html>
<head>
<title>'.$pages['name'].' - '.$mybb->settings['bbname'].'</title>
{$headerinclude}
</head>
<body>
{$header}
'.$pages['template'].'
{$footer}
</body>
</html>';
			$template=str_replace("\\'","'",addslashes($template));
			add_breadcrumb($pages['name']);
			eval("\$page=\"".$template."\";");
			output_page($page);
		}
		else
		{
			eval('?>'.$pages['template'].'<?');
		}
		exit();
	}
}

Now this can "probably" be fixed by having the pagemanager app call the template via the template call where from a quick browse it appears the work is done by advanced sideboxes.

Therefore the fix more needs to be on the pagemanager side. I am pretty busy with coding at the moment, but I will see if this works by a) changing pagemenager to use index.php (the exit call should stop everything after this being called if it finds a page query string) and then getting it to call the $index template.

Going to be at least 2 weeks before I can even look at that, but that is the basic way to get these two talk from what I can see.

I am 90% complete on my own CMS which uses its own sidebox system that I am not 100% happy with, so what I will likely do after completing the code is to toy with getting it to work with index.php and advanced sideboxes.

Dan
I think it would be much easier to allow ASB to handle things differently so that if the current script were 'misc.php' then there could be a conditional set up for particular pages. If the script is misc.php and there is an active page that is recognized (only) then add a hook (that you will need to have created in your PM code)-- then when the hook is called, check again to see which script and have another set of special circumstance for THIS_SCRIPT=='misc.php' in which the template isn't edited, but rather a $template_variable is globalized and set.

I have been talking and thinking about the next move for ASB and I am almost there, mentally-- I haven't written a single line of code for 1.7 physically though . . . I have to feel good about my plan before I ever really can get anything done. Smile

Let me know how it goes as I'm very interested in seeing what you can do with this.
It may be easier and better but in reality pagemanager should use a template anyway. Ill have a look soon

Right I modified pagemanager to use a template, which is the first part.

So no once that is done we just need to allow advanced sideboxes to globally edit any template rather than a selective few.

So it still won't work with pagemanager with the above edits...yet, though I have a possible "hacky" solution

Once you have the ability to easily add this to any template or page this should be pretty easy to allow people to use with pagemanager.

ill get my content system out soon when I do, perhaps we can collaborate in using ADV sideboxes as the sidebox plugin.

The way I am handing it in my code is to hook into pre_page output


$plugins->add_hook("pre_output_page", "brookie_cms_blocks_output");

I then feed &$page into it by ref and manipulate the output by replacing a tag I had placed into the template, this way it can be put into any template you like easily. My only concern is overheads.

Essentially in your template you put

[ba]block_area_name[/ba]

The block areas are user definable so you can have as many as you want and you

This allows me to do the following

//build an array of blocks in the template
preg_match_all("/\[ba\](.*?)\[\/ba\]/is", $page, $matches);

foreach($matches[1] as $match)	{
   //query DB for blocks in block_area
   //loop through results
   // file_get_contents("the php block file");
    
}


That is all pseudo code of course, I don't want to release it before it is finished. This then allows people to develop blocks plop them in a "cms/blocks" folder and then include them wherever they want on any template.

The block areas then allows them to define specific blocks to sit within specific block areas meaning you can have different pages with different blocks.

If you are interested I will be happy to show you what I have so far and see if you can maybe improve it then we can work on an integration into the upcoming brookie cms.

ultimately cURL is faster than file_get_contents and will be the eventual way to go here, but for now this is working, there are probably better ways to handle this, like evaluating and using a template, however I wrote this late last year when I was going through a hard time mentally and emotionally so I kind of go the proof of concept working then dropped all other work on it
Are you able to set it so that it shows a certain group online. For example, rather than staff members show Premium or another group of members online?