Example #1
0
 /**
  * Generates a URL from the given parameters.
  *
  * @param  mixed   $params    The parameter values
  * @param  array   $context   The context
  * @param  Boolean $absolute  Whether to generate an absolute URL
  *
  * @return string The generated URL
  */
 public function generate($params, $context = array(), $absolute = false)
 {
     $slug = null;
     if (isset($params['engine-slug'])) {
         $slug = $params['engine-slug'];
         aRouteTools::pushTargetEnginePage($slug);
         unset($params['engine-slug']);
     }
     // Note that you must pass false to parent::generate for the $absolute parameter
     $result = aRouteTools::addPageToUrl($this, parent::generate($params, $context, false), $absolute);
     if ($slug) {
         aRouteTools::popTargetEnginePage($slug);
     }
     return $result;
 }
Example #2
0
 <?php 
    // updated page.
    ?>

 <?php 
    slot("a-slot-controls-{$pageid}-{$name}-{$permid}");
    ?>
   <li class="a-controls-item choose-images">
     <?php 
    aRouteTools::pushTargetEngineSlug('/admin/media', 'aMedia');
    ?>
     <?php 
    echo link_to('<span class="icon"></span>' . a_get_option($options, 'chooseLabel', a_('Choose Images')), 'aMedia/select', array('query_string' => http_build_query(array_merge($options['constraints'], array("multiple" => true, "aMediaIds" => implode(",", $itemIds), "type" => "image", "label" => a_get_option($options, 'browseLabel', a_('You are creating a slideshow of images.')), "after" => url_for("aSlideshowSlot/edit") . "?" . http_build_query(array("slot" => $name, "slug" => $slug, "permid" => $permid, "noajax" => 1))))), 'class' => 'a-btn icon a-media a-inject-actual-url'));
    ?>
     <?php 
    aRouteTools::popTargetEnginePage('aMedia');
    ?>
   </li>

   <?php 
    include_partial('a/variant', array('pageid' => $pageid, 'name' => $name, 'permid' => $permid, 'slot' => $slot));
    ?>

 <?php 
    end_slot();
    ?>

<?php 
}
?>
Example #3
0
File: _form.php Project: hashir/UoA
		</div>
	</div>

	<hr class="a-hr" />
	<div class="delete preview section a-form-row">
		<?php 
$engine = $a_event->findBestEngine();
?>
	  <?php 
aRouteTools::pushTargetEnginePage($engine);
?>
		<?php 
echo link_to('<span class="icon"></span>' . a_('Preview'), 'a_blog_post', array('preview' => 1) + $a_event->getRoutingParams(), array('class' => 'a-btn icon a-search lite a-align-left', 'rel' => 'external'));
?>
	  <?php 
aRouteTools::popTargetEnginePage($engine->engine);
?>
	  <?php 
if ($a_event->userHasPrivilege('delete')) {
    ?>
		  <?php 
    echo link_to('<span class="icon"></span>' . a_('Delete'), 'a_event_admin_delete', $a_event, array('class' => 'a-btn icon a-delete alt lite a-align-right', 'method' => 'delete', 'confirm' => a_('Are you sure you want to delete this event?')));
    ?>
	  <?php 
}
?>
	</div>

</form>

<?php 
Example #4
0
    ?>
	<!-- AddThis Button BEGIN -->
  <?php 
    aRouteTools::pushTargetEnginePage($aEvent->findBestEngine());
    ?>
	<div class="addthis_toolbox addthis_default_style">
		<a href="http://addthis.com/bookmark.php?v=250&amp;username=<?php 
    echo $addthis_username;
    ?>
" class="addthis_button_compact"
			addthis:url="<?php 
    echo url_for('a_event', $aEvent, true);
    ?>
"
			addthis:title="<?php 
    echo $aEvent['title'];
    ?>
">Share</a>
		<span class="addthis_separator">|</span>
		<a class="addthis_button_facebook"></a>
		<a class="addthis_button_myspace"></a>
		<a class="addthis_button_google"></a>
		<a class="addthis_button_twitter"></a>
	</div>
  <?php 
    aRouteTools::popTargetEnginePage('aEvent');
    ?>
	<!-- AddThis Button END -->	
	<?php 
    use_javascript('http://s7.addthis.com/js/250/addthis_widget.js#username=' . $addthis_username);
}
Example #5
0
    ?>
	<!-- AddThis Button BEGIN -->
  <?php 
    aRouteTools::pushTargetEnginePage($aBlogPost->findBestEngine());
    ?>
	<div class="addthis_toolbox addthis_default_style">
		<a href="http://addthis.com/bookmark.php?v=250&amp;username=<?php 
    echo $addthis_username;
    ?>
" class="addthis_button_compact"
			addthis:url="<?php 
    echo url_for('a_blog_post', $aBlogPost, true);
    ?>
"
			addthis:title="<?php 
    echo $aBlogPost['title'];
    ?>
">Share</a>
		<span class="addthis_separator">|</span>
		<a class="addthis_button_facebook"></a>
		<a class="addthis_button_myspace"></a>
		<a class="addthis_button_google"></a>
		<a class="addthis_button_twitter"></a>
	</div>
  <?php 
    aRouteTools::popTargetEnginePage('aBlog');
    ?>
	<!-- AddThis Button END -->	
	<?php 
    use_javascript('http://s7.addthis.com/js/250/addthis_widget.js#username=' . $addthis_username);
}