Tom
Members-
Posts
1517 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by Tom
-
You make calls to the API endpoints. I've fixed the readme, seems GitHub changed how they parse markdown and broke it Make sure you're including a Basic Auth token on all requests.
-
You'll need to add the header "Authorization" with the value "Basic dXNlcm5hbWU6cGFzc3dvcmQ=", where dXNlcm5hbWU6cGFzc3dvcmQ= is base64_encode($username.':'.$password)
-
@bass Can you give any more information than "does not work"? What response do you get? Don't forget to set the 'Authorization' header.
-
In its current state the API requires basic auth user credentials set in the Authorization header for every request. Also unless you've set up URL redirects you'll need to access it via "site.com/action.php/api/..."
-
The endpoints are documented in the readme on GitHub - they're mostly GET requests so very simple. How you make those GET requests depends on what you're doing (i.e. from Javascript, or an app, etc.) but you can find tons of tutorials on making HTTP requests online.
-
Yep, open source. This is released under the license of the original VAForum, and any derived works should be too. Feel free to open a pull request too, I'm happy to merge in any changes if they benefit everyone. The general code structure is the same as phpVMS. Also I'll let you figure out how to show different images, I'm sure there's many different ways to do it...
-
Use the browser developer tools to find the element pushing the page width out. I would check myself but the site is different now.
-
Why would this hamper the use of your free domain? If you're not restricted on your usage I'm not sure why you'd want to limit people accessing your site - what if the person you limit was interested in signing up, and now goes elsewhere instead?
-
Feel free to open a pull request with your fixes
-
This plugin doesn't make any changes for input/output encoding. You'll want to check the encoding on the phpVMS news table vs the encoding you've specified in the header. For best support you'll want them to be UTF8.
-
There's a strange character around the top of your <body> that seems to be kicking the site down a line - fix that and then set height:120px; on #templatemo_header
-
Do you want vars on your index as well as other functions? Or is that it? Either way you'll just have to write some logic in __call to deal with the various possibilities.
-
My understanding is you want to handle calls to the module (class) for routes (functions) that might not exist? That right? codon itself might not have anything, but PHP has __call? public function __call($name, $args) { // ... } where $name is the first regular variable of your route: index.php/module/var/... and $args is an array containing all the rest: index.php/module/var/arg/arg/... This isn't so much remapping as handling calls to functions that don't exist, so if you visit index.php/module/action and function Module::action() exists, it will only call that function, not __call.
-
Virgin Atlantic Virtual - Back up and running
Tom replied to ahughes3's topic in Virtual Airlines Discussion
On OS X this behaviour is built in (with more natural physics too), and the plugin exaggerates scroll distance a lot more than I exaggerated the disapproval of this technique. A scroll to take me from the top of this page to the bottom of your first post takes me all the way down your entire website One should come to expect the odd critique here and there on a public forum, requested or otherwise, especially when showing off a website to a load of people who build websites Responding with hostility doesn't really make people want to help in the future, especially if asked for - wouldn't want to waste your valuable time after all. P.S. If you don't want a discussion in the future there's an entire forum devoted to your requirements called "Virtual Airlines News", woah -
Virgin Atlantic Virtual - Back up and running
Tom replied to ahughes3's topic in Virtual Airlines Discussion
Yep. -
Virgin Atlantic Virtual - Back up and running
Tom replied to ahughes3's topic in Virtual Airlines Discussion
Yes, I scroll a small amount and it takes over and I end up half way down the page. -
Virgin Atlantic Virtual - Back up and running
Tom replied to ahughes3's topic in Virtual Airlines Discussion
Scrolljacking - just google that term and you'll see why it's bad practice (and so widely hated). Also if it were me I'd make an effort to contact Virgin and try to form a relationship now. It's only a matter of time before Virgin contact you, and when they do it won't be because they want to be friends. Good luck though -
Just using parts doesn't mean the license doesn't apply.
-
You should also read the license http://templated.co/license because as simple as it is you've managed to breach it.
-
The tabs on the page http://phpvms.net/features are not working so you can only see "Basic Features" It's because the page is linking to a version of jQuery Tools that doesn't seem to exist anymore. Nabeel will need to update the site.
-
Not sure what to suggest at this point, if the encodings all match exactly and you've input fresh content so it's correctly encoded on entry then there's not much that could change the encoding. I'd need to spend some time looking around your site & database. I've done it before so it's certainly possible, however if I were to I'd rewrite the module from scratch. Perhaps I will.
-
Can you check the encoding of the forum database tables? You'll need it to match the encoding for the rest of the tables on your site. You'll likely also need to re-enter or convert special characters as changing the encoding probably won't fix those characters once they've been entered.
-
Ah yeah, you need to stop it on registration too, e.g. <?php $excludedPages = array('REGISTRATION', 'LOGIN'); if(!in_array(MainController::$activeModule, $excludedPages) && !Auth::LoggedIn()){ header("Location: /index.php/registration"); } ?> So just add in the controller names of any pages you want excluded from the redirect in $excludedPages
-
You can redirect using the php header() function, but it has to be before any output. In the very top of your layout.php (or layout.tpl/header.tpl if you're old school), before any output or whitespace: <?php if(!Auth::LoggedIn()){ header("Location: /index.php/registration"); } ?> You'll need to let them log in somehow though, so perhaps instead: <?php if(MainController::$activeModule !== 'LOGIN' && !Auth::LoggedIn()){ header("Location: /index.php/registration"); } ?> Then you have to account for log out, etc. but I'll let you deal with those
-
Check index.php - make sure there's no blank space before the opening php tags or anything that would cause output.