Example #1
0
function content_id()
{
    if (post_id()) {
        return post_id();
    } elseif (page_id()) {
        return page_id();
    }
}
Example #2
0
function content_id()
{
    if (post_id()) {
        return post_id();
    } elseif (product_id()) {
        return product_id();
    } elseif (page_id()) {
        return page_id();
    } elseif (defined('CONTENT_ID')) {
        return CONTENT_ID;
    }
}
Example #3
0
        $results[$key]['url'] .= '?highlight=' . $enc;
    }
}
loader_import('saf.GUI.Pager');
$pg = new Pager($cgi->offset, appconf('limit'));
if ($parameters['multiple'] == 'yes') {
    $t = '';
    if (is_array($parameters['ctype'])) {
        foreach ($parameters['ctype'] as $ct) {
            $t .= '&ctype[]=' . urlencode($ct);
        }
    }
    $d = '';
    if (is_array($parameters['domains'])) {
        foreach ($parameters['domains'] as $ds) {
            $d .= '&domains[]=' . $ds;
        }
    }
} else {
    $t = '&ctype=' . urlencode($parameters['ctype']);
    $d = '&domains=' . urlencode($parameters['domains']);
}
$pg->setUrl(site_current() . '?query=%s' . $t . $d . '&show_types=%s&multiple=%s&show_domains=%s', $enc, $parameters['show_types'], $parameters['multiple'], $parameters['show_domains']);
$pg->total = $total;
$pg->setData($results);
$pg->update();
page_id('search');
page_title('SiteSearch - Results For "' . $cgi->query . '"');
template_simple_register('cgi', $cgi);
template_simple_register('pager', $pg);
echo template_simple('stats_search.spt', array('show_types' => $show_types, 'show_domains' => $show_domains, 'types' => $types, 'domains' => $domains, 'multiple' => $multiple, 'syntax' => $res['metadata']['syntax']));
Example #4
0
// are deleted when the user has received a response.  This is ideal for
// such uses as community help services (ie. addictions, teen help, etc.).
appconf_set('user_anonymity', false);
appconf_set('user_age_list', array('blank' => '- SELECT -', 'Under 18' => 'Under 18', '18-24' => '18-24', '25-29' => '25-29', '30-39' => '30-39', '40-49' => '40-49', '50-59' => '50-59', '60-70' => '60-70', 'Over 70' => 'Over 70'));
/**
 * Set this to the template you wish to use to display the app, otherwise
 * the default is used.
 */
appconf_set('template', false);
/**
 * Set this to the page ID of the page you would like to be the parent of
 * the app.  This affects the web site navigation while within the
 * app itself, and the breadcrumb trail as well.
 */
appconf_set('page_below', false);
/**
 * Set this to the ID of the page which is an alias of the app.
 */
appconf_set('page_alias', false);
if ($context == 'action') {
    if (appconf('page_below')) {
        page_below(appconf('page_below'));
    }
    if (appconf('page_alias')) {
        page_id(appconf('page_alias'));
    }
    if (appconf('template')) {
        page_template(appconf('template'));
    }
}
appconf_set('format_date_time', 'F jS, Y - g:i A');
 class="even"<?php 
        }
        ?>
 id="page-<?php 
        page_id();
        ?>
">
					<td><input type="checkbox" value="<?php 
        page_id();
        ?>
" name="pid[]"></td>
					<td><a href="#" onclick="ajaxLoad('<?php 
        path(array('do' => 'contentManagePages'), 'AdminDo');
        ?>
?pid=<?php 
        page_id();
        ?>
');return false;"><?php 
        echo page_title();
        ?>
</a></td>
					<td><?php 
        page_alias();
        ?>
</td>
				</tr>
			<?php 
        $i++;
    }
}
?>
Example #6
0
/**
 *  Is current loaded page the specified page?
 *  Useful for logic specific to a page
 *
 *  @param string $page [Value to compare to current loaded page]
 *  @return boolean
 *  @author Christophe Limpalair
 */
function is_page($page = '')
{
    if (page_id() === (string) $page) {
        return true;
    }
    return false;
}
Example #7
0
                              <li><i class="fa fa-check color-green"></i> Responsive Bootstrap Template</li>
                              <li><i class="fa fa-check color-green"></i> Corporate and Creative</li>
                          </ul>
                      </div>
                  </div>

                  <blockquote class="hero-unify">
                      <p>Award winning digital agency. We bring a personal and effective approach to every project we work on, which is why. Unify is an incredibly beautiful responsive Bootstrap Template for corporate professionals.</p>
                      <small>CEO, Jack Bour</small>
                  </blockquote>
              </div><!--/col-md-8-->

              <!-- Posts -->
              <div class="col-md-4 posts">
<module type="posts" id="posts<?php 
print page_id();
?>
"/>
          </div><!--/row-->
          <!-- End Info Blokcs -->

          <!-- Our Clients -->
              <div class="headline"><h2>Our Clients</h2></div>
         <module type="pictures" template="owl-carousel" id="images<?php 
print PAGE_ID();
?>
"/>
          <!-- End Our Clients -->
      </div><!--/container-->
    </div>
      <!-- End Content Part -->
Example #8
0
<?php

theme_include('header');
?>

	<main class="content" role="main" id="page-<?php 
echo page_id();
?>
">

	    <article>

	        <header>
	        <h1 class="post-title"><?php 
echo page_title();
?>
</h1>
	        </header>

	        <section class="post-content">
	            <?php 
echo page_content();
?>
	        </section>

	    </article>

	</main>


<?php 
Example #9
0
<section class="content">
	<?php 
echo page_content();
?>

	<?php 
if (user_authed()) {
    ?>
	<p class="edit">
		<a href="<?php 
    echo admin_url('pages/edit/' . page_id());
    ?>
">Edit this page</a>
		<?php 
    if (page_status() != 'published') {
        ?>
		<br>Your curretly viewing this page as <strong><?php 
        echo page_status();
        ?>
</strong>
		<?php 
    }
    ?>
	</p>
	<?php 
}
?>
</section>

Example #10
0
<?php

/*
 * Hello World Example
 *
 * This example illustrates the basic multi-lingual capabilities of Sitellite.
 */
// set the page title to the text 'Hello World'
// note that intl_get() automatically translates the text based on the
// user's preferred languages
page_title(intl_get('Hello World'));
// insert into breadcrumb navigation
page_id('helloworld');
page_below('examples');
// set default language to 'fr' then rebuild 'example' app index
global $intl;
$intl->language = 'fr';
$intl->getIndex();
// now we output the same text, but it will appear this time in French
echo '<p>' . intl_get('Hello World') . '</p>';
// let's reset the language settings now, so the rest of the site continues
// in the default language
$intl->language = 'en';
Example #11
0
    $info['display_title'] = ucwords(preg_replace('/[^a-zA-Z0-9]+/', ' ', $info['display_title']));
    unset($info['dirname']);
    unset($info['basename']);
    if (empty($info['description'])) {
        $info['description'] = $info['display_title'];
    }
    $res[] = (object) $info;
}
if ($parameters['title']) {
    if ($box['context'] == 'action') {
        page_title($parameters['title']);
    } else {
        echo '<h2>' . $parameters['title'] . '</h2>';
    }
    if (appconf('page_alias')) {
        page_id('sitegallery-pixgallery-action');
        page_below(appconf('page_alias'));
    }
}
$valid = appconf('valid');
foreach (array_keys($res) as $k) {
    if (!in_array(strtolower($res[$k]->extension), $valid)) {
        unset($res[$k]);
        continue;
    }
    $res[$k]->src = sitegallery_get_thumbnail($parameters['path'] . '/' . $res[$k]->name . '.' . $res[$k]->extension);
    //list ($res[$k]->width, $res[$k]->height) = getimagesize ('pix/' . $parameters['path'] . '/' . $res[$k]->name . '.' . $res[$k]->extension);
}
template_simple_register('results', $res);
page_add_script(site_prefix() . '/inc/app/sitegallery/js/prototype.js');
page_add_script(site_prefix() . '/inc/app/sitegallery/js/scriptaculous.js?load=effects');