s9y Reversed Integration via Functions
Posted: Thu Jan 18, 2007 12:03 am
Hello s9y people & developers,
that's my first post after the great meeting with forum's search engine
What I want (and propably others) is to intergrate s9y in my site. For my
bad luck I didn't discovered s9y earlier so to make my site be based on it.
Anyway...
In general I have understand how s9y works and with search & grep
I figured the code below, that gives me such good output to integrate
s9y easily to my site.
The code is ...
this code gives me 2 variables
$blog_out , has the entries... and
$sidebar , has the right plugins
also by changing $serendipity array, I can change internal s9y links
to show my site's internal links.
'implemnt' & 'yopath', $serendipity array variables, have been added
by me inside s9y code for greater flexibility on changing url's.
I'm just in the last step before the total integration & broswing s9y
with my site's layout. The only problem that I have is, that I cannot
find how can I pass global variables so to change the `Entries` content...
By default s9y uses
"index.php?/archives/2006/11.html" this kind of urls,
I have changed them to
"index.php?40:30&p=index&a=/archives/2006/11.html"
Where could I pass the $_GET['a'] variable at s9y so to change the
`Entries` content ?
I tried many things around $_SERVER & $_GET variables but nothing
with success.
What do you suggest ?
that's my first post after the great meeting with forum's search engine
What I want (and propably others) is to intergrate s9y in my site. For my
bad luck I didn't discovered s9y earlier so to make my site be based on it.
Anyway...
In general I have understand how s9y works and with search & grep
I figured the code below, that gives me such good output to integrate
s9y easily to my site.
The code is ...
Code: Select all
<?php
$p_current = $_GET['p'];
$a_current = $_GET['a'];
$uurl = "40:30";
$olddir = getcwd();
$serendipity_directory = 'blog/serendipity/';
chdir($serendipity_directory);
include_once('serendipity_config.inc.php');
include_once('include/genpage.inc.php');
$serendipity['serendipityHTTPPath'] = '/';
$serendipity['indexFile'] = '';
$serendipity['implemnt'] = 'true';
$serendipity['yopath'] = $uurl . '&p=index&a=';
serendipity_plugin_api::generate_plugins('right', 'span');
$blog_out = serendipity_smarty_fetch('ENTRIES' , 'entries.tpl', true);
$sidebar = serendipity_smarty_fetch('sidebar_right', 'sidebar.tpl', true);
chdir($olddir);
?>$blog_out , has the entries... and
$sidebar , has the right plugins
also by changing $serendipity array, I can change internal s9y links
to show my site's internal links.
'implemnt' & 'yopath', $serendipity array variables, have been added
by me inside s9y code for greater flexibility on changing url's.
I'm just in the last step before the total integration & broswing s9y
with my site's layout. The only problem that I have is, that I cannot
find how can I pass global variables so to change the `Entries` content...
By default s9y uses
"index.php?/archives/2006/11.html" this kind of urls,
I have changed them to
"index.php?40:30&p=index&a=/archives/2006/11.html"
Where could I pass the $_GET['a'] variable at s9y so to change the
`Entries` content ?
I tried many things around $_SERVER & $_GET variables but nothing
with success.
What do you suggest ?