Jump to content

Luis

Members
  • Posts

    295
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Luis

  1. Yeah you´re right, but I think the risk is minimal, i´m just replacing the $user with an returned $user from $users->get. So the new $user should have all the same methods and properties. So $user === $user. Correct me if I´m wrong
  2. just tried to ninja edit before u noticed my post my little workaround so far: $user = $users->get($user->id); on top
  3. The next bit found. After calling a page, a script on top checks if the $user is allowed to do this or that action like so: if(!$project->staff->has($user)){ header('Location: '.$pages->get(1)->url); die(); } and now $user->userimage->url is available. @pete: no i`m not iterating through my users I just want to access the userimage from this user, who is actually accessing the page. So, You are looking into your profile and you get your userimage.
  4. After playing Sherlock Holmes again, the riddle grows. I placed <?= $user->userimage->url ?> in various places inside my controller.php to find out under which circumstances the url method grabs the appropiate image file. After placing it right before the closing body tag, it gives me the right file. Now I figured out that after doing this right before: <?php foreach($users as $member): ?> <?php if($member->hasRole('projectmanager')): ?> <option value="<?= $member->id ?>"><?= $member->membername ?></option> <?php endif ?> <?php endforeach ?> the $user->userimage is present.
  5. Ok, this is the request made by $image->url 41/ /projectplaner/clientspaces/site-admin/assets/files GET 403 Forbidden and this is the request made by <?= $config->urls->files . $user->id ?>/<?= $user->userimage ?> koala.jpg /projectplaner/clientspaces/site-admin/assets/files/41 GET 304 Not Modified Does PW just try to get the folder by accident, or is this request blocked directly on the folder?
  6. 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/"; index.config.php: 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. EDIT: 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 ?>" />
  7. Its still working, some nice folks purchased a copy
  8. 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. regards EDIT: The module now needs permission 'analytics-view'
  9. Neues Modewort: Putinesque Definition: Offensichtlich wahre Dinge negieren. Gebrauch:Russische Soldaten auf der Krim sind Putinesque

  10. Hey @KabelDe was ist los mit eurem internetz in 76863?

  11. RT @teppokoivula: My latest blog post is an introduction to hooks and hooking in #ProcessWire: http://t.co/QmYkfYliNM

  12. 30 fantastic km Bike tour in the office, good start in the day

  13. RT @Netzpiloten: Weiß jmd. mehr über den Bericht, dass @Immobilienscout angeblich @Deskwanted in die Insolvenz getrieben haben soll: http:/…

  14. Comic sans... macht Rechnungen nicht lustiger http://t.co/cSxHiDxqaL

  15. Hmmm some people love the risk http://t.co/uAVdA1NX6r

  16. WTF

    position:absolute; margin-top:-20px ... God damnit, why???

  17. Thank you Fenton. @Marc: I´m really sorry for my late response, looks to me like I have to rework the output in the foreach loop to let it look like the Piwik way. Maybe you could take a look into the Git Repo, I hardly could find time.
  18. Hi Horst, thank you for testing and for the links to stack and mysql. Weird thingy. Well, got to look how to solve this.
  19. 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?
  20. Oh okay. iOS7 great amazing awesome. Good work #wwdc

×
×
  • Create New...