Jump to content

Peter

Members
  • Posts

    44
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Peter

  1. Great module!

    I only have one problem - cannot get it running on my VPS (runs great locally on MAMP).

    When trying to authenticate I get: Could not fetch the accessToken (Apache 2.2.5/PHP 5.4.19)

    I've tested it on two sites and also on a fresh install of the latest build - same result.

    Any ideas?

  2. $label = 'label';
    if ($user->language->title != 'no') {
    $label = "label{$user->language}";
    }
    
    echo $page->fields->get('phone')->$label;
    

    The above code works great on a regular php page, but I can´t get it to work inside a function - yes, yes - newbie :-)

    function renderAuthorData($page) {
    
    	$na = "<span class='na'>n/a</span>";
    	$download = $page->files->first()->name;
    	
    	//Check if author is an employee
    	$vista = $page->vista;
    	if($vista == 1){
    	
    	$label = 'label';
    	if ($user->language->title != 'no') {
    	$label = "label{$user->language}";
    	}
    	
    	$out =	"\n<table class='publication_data'>" .
    	"\n\t<tbody>";
    		
    		//Check if author has a specific function
    		if($page->function){
    		$out .= "\n\t<tr><th>". ($page->fields->get('function')->$label) ."</th><td>". ($page->function ? $page->function : $na) . "</td></tr>";
    		}
    		
    		$out .= "\n\t<tr><th>". ($page->fields->get('author_title')->$label) ."</th><td>" . ($page->author_title ? : $na) . "</td></tr>" .
    				"\n\t<tr><th>". ($page->fields->get('phone')->$label) ."</th><td>" . ($page->phone ? : $na) . "</td></tr>" .
    				"\n\t<tr><th>". ($page->fields->get('author_email')->$label) ."</th><td>" . ($page->author_email ? : $na) . "</td></tr>" .
    				"\n\t<tr><th>". ($page->fields->get('address')->$label) ."</th><td>" . ($page->address ? : $na) . "</td></tr>" .
    				"\n\t<tr><th>CV</th><td><a href='{$page->files->first()->url}'>" . $download . "</a> ({$page->files->first()->filesizeStr})</td></tr>" .
    				"\n\t</tbody>" .
    				"\n</table>";
    		
    	}else if($vista == 0){
    	
    	$out =	"\n\t<div style='clear:both;'><p>{$page->title} er ikke ansatt i Vista Analyse AS, men er medforfatter på følgende publikasjon(er):</p></div>";
    	
    	}	
    	
    	return $out;
    
    	}
    

    It would be great to check for $user->language from inside a function. Can anyone help me with this? Probably very easy for someone with more PHP knowledge than me....

    (The slightly modified code is from Ryan´s Skyscraper Profile - I have spent a few hours "dissecting" that profile to make a site for client - will share next week in the forum)

  3. Hi,

    Need some pointers porting a client's site (built by me with ExpressionEngine) to PW.

    My plan is to use the Skyscraper profile as a starting point. I have already converted the skyscraper profile to serve my purpose:

    The relation: 'skyscrapers -> cities -> architects' is now 'publications -> categories -> authors'

    I need help rewriting 'search.php' and 'search_form.php'. I want to add search for publications by categories/subcategories, only showing subcategories when needed in another dropdown.

    My categories/subcats:

    Publications (formerly 'cities')

    - Reports

      - sub cat 1

      - sub cat 2

      - sub cat 3

      - sub cat 4

      - sub cat 5

    - Articles

    - Presentations

    - Miscellaneous

    Best regards,

    Peter

  4. Hi,

    I´m looking for a simple self-hosted helpdesk software (preferably PHP) that comes with a nice design out-of-the box (or at least one that can be easily styled).

    Been googling around for a while and found RT: Request Tracker (Perl). RT seems good, but I would like to get some opinions.

    ...or, maybe I should just get started building my own helpdesk with PW :-)

    -Peter

    PS. Tested Ryan´s Pro Cache on two sites today and it's really lightning fast.............

    • Like 1
  5. Testing dev branch on MAMP (PHP 5.4.4) and on my VPS (PHP 5.4.8).

    Getting the same error as apeisa on modules page:

    Error Class SessionHandlerDB contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (ConfigurableModule::__get, ConfigurableModule::__set) (line 195 of /home/tucamed2/public_html/wire/modules/Session/SessionHandlerDB/SessionHandlerDB.module)
    
  6. I get a 403 (forbidden) for all of them.

    Seems like LiteSpeed is taking care of the security issues:

    - Only LiteSpeed supports .htaccess with Apache compatibility.

    - Only LiteSpeed has a rewrite engine compatible with Apache mod_rewrite.

    - Only LiteSpeed has request filtering compatible with Apache mod_security

    - Only LiteSpeed can work flawlessly with control panels written for Apache

    Source:

    http://www.litespeedtech.com/hosting-control-panel-litespeed-web-server-=-the-best-choice-for-web-hosting.html

    -Peter

    • Like 1
×
×
  • Create New...