Skip to content
gtbu edited this page Sep 20, 2026 · 15 revisions

Welcome to the Simple-Blog-3 wiki!

The configuration of this Gadget is often not quite easy. The getgadget-call should be in the sidebar-code of the theme.

In the bootstrap4-theme (settings.php) the gadget is called

// Simple Blog Gadgets in Text Areas

for settings.php

ob_start();
gpOutput::GetGadget('Simple_Blog');
$area_content = ob_get_clean();
gpOutput::Area('Simple-Blog-Gadget', $area_content);

ob_start();
gpOutput::GetGadget('Simple_Blog_Categories');
$area_content = ob_get_clean();
gpOutput::Area('Simple-Blog-Categories-Gadget', $area_content);

ob_start();
gpOutput::GetGadget('Simple_Blog_Archives');
$area_content = ob_get_clean();
gpOutput::Area('Simple-Blog-Archives-Gadget', $area_content);

in the sidebar-code of the template.php of the theme 👍(included in <? php.....> !) :

if( gpOutput::GadgetExists('Simple_Blog') ){
gpOutput::GetArea('Simple-Blog-Gadget', ''); // as defined in settings.php					}
                                            }
if( gpOutput::GadgetExists('Simple_Blog_Categories') ){
gpOutput::GetArea('Simple-Blog-Categories-Gadget', ''); // as defined in settings.php
					    }

if( gpOutput::GadgetExists('Simple_Blog_Archives') ){
gpOutput::GetArea('Simple-Blog-Archives-Gadget', ''); // as defined in settings.php
					    }
						?> 
  • In some cases gpOutput::GetAllGadgets(); can be used instead in the sidebar.

in cases when you get - with active debugger - an area-error, changing the code like

// Register a main area for the sidebar
$gpOutput::Area('Sidebar_Menu', '<ul class="menu-list"><li>Home</li><li>About</li></ul>');

// Register an area to be filled dynamically later
$gpOutput::Area('Dynamic_Content', '<!-- JS/PHP content goes here later -->');


// --- PHASE 2: TRIGGERING MANUAL OUTPUT (The Flush) ---

echo "<h1>Welcome to the page!</h1>";
echo "<p>This text appears BEFORE the sidebar loads.</p>";

// *** THE FLUSH IS CALLED HERE ***
// This forces the system to immediately output the content of 'Sidebar_Menu' and 'Dynamic_Content'.
gpOutput::Flush();

// --- PHASE 3: FURTHER OUTPUT (The rest of the code) ---

echo "<hr>";
echo "<h2>This text appears AFTER the flush!</h2>";

// If you request an area again here, it will also be output,
// but the flush has already handled the bulk of the work.
echo '<div class="footer-area">'; 
echo gpOutput::Get('Sidebar_Menu'); // Executed again, but since it was already in the buffer, output is fast.
echo '</div>';

````
may solve the problem 


***


Since php8.1 are the obsolete date-time-functions a problem. A [strftime.php](https://github.com/gtbu/Typesetter-5.3-p8/tree/main/include/thirdparty/time)  with the namespace blogtime was added in simple-blog 3.1.

* Here an example of a working configuration:

![Blog-Configuration](https://github.com/gtbu/Typesetter5-Versions-Themes-Plugins/blob/main/x_Addons/sblog.jpg)


***


* P-S. The author of the Bootstrap4-Theme add the call for Simple-Blog plugin already in the settings.php in the root of the theme (24 / Simple Blog Gadgets in Text Areas.....) - it appears therefore in the footer-textareas of all 4 subthemes - i think it is better to change the code so that the Blog navigations appear only in the right sidebar of the sidebar-theme ---> move the code of line 24 ....38 to the settings.php of the sidebar-theme.

* please give me a comment here under issue to this proposal !

Clone this wiki locally