Skip to content

Commit

Permalink
theme fixes, auction app fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
voitto committed Nov 18, 2008
1 parent b2370c6 commit fadd90c
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 5 deletions.
3 changes: 3 additions & 0 deletions app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ env:
- identica
- photo
- auction

installed:

plugins:
- sessions
Expand Down Expand Up @@ -117,6 +119,7 @@ env:
ping_server: http://dejafeed.com/?submit

blocks:
-pages
-categories

collection_cache:
Expand Down
19 changes: 19 additions & 0 deletions app/controllers/identities.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,25 @@ function post( &$vars ) {
$resource->insert_from_post( $request );
$i = $Identity->find( $request->id );
$i->set_etag();

$installed = environment('installed');

if (is_array($installed)) {

foreach($installed as $appname) {

$app = $Setting->base();
$app->set_value('profile_id',$i->id);
$app->set_value('person_id',$p->id);
$app->set_value('name','app');
$app->set_value('value',$appname);
$app->save_changes();
$app->set_etag();

}

}

header_status( '201 Created' );
redirect_to( $request->resource );
}
Expand Down
2 changes: 2 additions & 0 deletions app/models/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ function Category() {

// fields

$this->set_limit(100);

$this->char_field( 'name' );
$this->char_field( 'term' );
$this->char_field( 'scheme' );
Expand Down
22 changes: 18 additions & 4 deletions app/plugins/wp.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ function add_management_page( $page,$menu,$access,$file,$func='',$url='' ) {
}

function the_excerpt_reloaded() {
the_post();
// dur
}

function query_posts() {
Expand Down Expand Up @@ -1511,14 +1511,28 @@ function setup_postdata( $post ) {

function dynamic_sidebar() {
global $request;
global $sidebar_done;
$blocks = environment('blocks');
if (!empty($blocks)) {
if (!empty($blocks) && !$sidebar_done) {
foreach ($blocks as $b) {
echo '<script type="text/javascript" src="'.$request->url_for(array('resource'=>$b,'action'=>'block.js')).'"></script>';
// if it's the prologue theme, don't show PAGES in sidebar
if (!($b == 'pages' && environment('theme') == 'prologue-theme')){
//$renderpartial = true;
if (isset($renderpartial)) {
// this would be better/faster, but not working yet
echo '<script type="text/javascript">';
render_partial(array('resource'=>$b,'action'=>'block.js'));
echo '</script>';
} else {
// doing a call back to the server for each block. not cool XXX
echo '<script type="text/javascript" src="'.$request->url_for(array('resource'=>$b,'action'=>'block.js')).'"></script>';
}
}
}
$sidebar_done = true;
}
echo '<a href="http://openmicroblogger.org"><img src="http://openmicroblogger.org/omb.gif" style="border:none;" alt="openmicroblogger.org" /></a>'."\n";
return true;
//echo '<a href="http://openmicroblogger.org"><img src="http://openmicroblogger.org/omb.gif" style="border:none;" alt="openmicroblogger.org" /></a>'."\n";
}

function single_tag_title( ) {
Expand Down
44 changes: 43 additions & 1 deletion db/library/dbscript/_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2268,7 +2268,7 @@ function migrate() {
foreach($db->models as $model)
$model->migrate();

echo "<BR>The database schema is now synced to the data models.<BR><BR>";
echo "<BR>The database schema is now synched to the data models.<BR><BR>";
exit;

}
Expand Down Expand Up @@ -2335,6 +2335,48 @@ function app_register_init($resource,$action,$button,$appname,$group) {

}

function get_nav_links() {

global $request;

$pid = get_app_id();

$links = array();

$i = get_profile($pid);


$links["Public"] = base_url(true);


if ($i && $i->id > 0) {

$links["Personal"] = $request->url_for(array(
"resource"=>"posts",
"byid"=>$i->id,
"page"=>1 ));

if (empty($i->post_notice))
$links["Profile"] = $request->url_for(array("resource"=>$i->nickname));
else
$links["Profile"] = $i->profile;

}

if ($pid > 0) {

$links["Logout"] = $request->url_for("openid_logout");

} else {

$links["Register"] = $request->url_for("register");
$links["Login"] = $request->url_for("email_login");

}

return $links;

}

function get_app_id() {

Expand Down

0 comments on commit fadd90c

Please sign in to comment.