Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by Luis

  1. Howdie folks,

    i´m setting up a multisite with global module and global template folder. 

    Most of the page render depends on $input->get, templates are delegated via 

    <?php if($page->template){$t = new TemplateFile($config->paths->templates . "views/view_{$page->route}.php");} echo $t->render(); ?>

    Template delegation happens in a controller.php named file on which this piece of code:

    <img src="<?= $user->userimage->url ?>" class="img-circle" />

    returns the 403 Forbidden, but only if i´m on the homepage and no other page data is called based on a get variable. 

    Short overview regarding the multisite setup:

    Index.php in root:

    $siteDir = 'clientspaces/site-admin';
      $config = new Config();
      $config->urls = new Paths($rootURL);
      $config->urls->wire = "$wireDir/";
      $config->urls->site = "$siteDir/";
      $config->urls->modules = "$wireDir/modules/";
      $config->urls->siteModules = "modules/";
      $config->urls->core = "$coreDir/";
      $config->urls->assets = "$assetsDir/";
      $config->urls->cache = "$assetsDir/cache/";
      $config->urls->logs = "$assetsDir/logs/";
      $config->urls->files = "$assetsDir/files/";
      $config->urls->tmp = "$assetsDir/tmp/";
      $config->urls->templates = "application/";
      $config->urls->adminTemplates = is_dir("$siteDir/$adminTplDir") ? "$siteDir/$adminTplDir/" : "$wireDir/$adminTplDir/";
      $config->paths = clone $config->urls;
      $config->paths->root = $rootPath . '/';
      $config->paths->sessions = $config->paths->assets . "sessions/";


    function ProcessWireHostSiteConfig() {
            return array(
                     'foo.example.de' => 'clientspaces/foo',
                      '*' => 'clientspaces/site-admin',

    I started with deleting all restrictions in .htacces, but this wasnt a success. :(


    Creating the url by hand will serve the file, but without the abillity to access the imageClass methods

    <img src="<?= $config->urls->assets ?>files/<?= $user->id ?>/<?= $user->userimage ?>" />
  2. thank you adrian for providing support. 

    I can only apologise, I hardly find time to update or work on my published modules. However, they are on Git, so you easily could fork them or do a commit.


    EDIT: The module now needs permission 'analytics-view' 

    • Like 1
  3. Hi,

    got a little problem with a float field. 

    Precision is set to 2. 

    If i input numbers > 10 000 the field rounds to 0 decimals. 

    e.g. i set the field to 10000.95 it saves 10001

    Rounding numbers smaller than 10000 works perfect, so 9999.91 is saved as 9999.91

    any ideas?

  4. Hey Pitbull,

    my files won´t help you on this issue. 

    The calendar picture I´ve posted above shows the integration in one of my apps. It generates his entries from various pages, so posting the code will even more confuse you. 

    Let´s try to find a solution for your problem. 

    On the very first, delete all calendar related code from your template. 

    Now, include the appropriate css files and jquery in your head.inc.

    Put the HTML code inside your calendar.php and throw the getEvens() function under the html. 

    After finishing this step, put the JavaScript function under the php part, within the calendar.php. 

  5. Sorry Pitbull,

    wrote the snippet on my Phone. 

    The snippet I posted has to be placed inside the getEvents() function.

    So change your code to this and send me feedback if its working:

    function getEvents(){
    	$days = wire('pages')->get("/calendar/")->children("sort=title");
    	foreach ($days as $day)
    		echo "'$day->title' : '";
                    echo "<span><p>";
    		$events = $day->children("sort=created");
    		foreach ($events as $event)
    			echo $event->title.' ';	
                    echo "</p></span>";
    		echo "', \n";
  6. strange,

    for understanding, your use case:

    User is in a PW environment and clicks on a link which sets a get variable to logout=1. 

    After logging the user out you want to perform an redirect to the login page. 

    So, you set up the following: 

    template file with the logout button.

    <? if($input->logout) logout and redirect ?>


    <a href="?logout=1">

    Did I understood right?

  • Create New...