PhpFox - Accessing function in external php file, from HTML file
$17-22 USD
Closed
Posted over 15 years ago
$17-22 USD
Paid on delivery
I have a site that runs of PhpFox and I purchased a mod that allows me to detect whether the site is being accessed by a mobile device, and automatically formats the screen content so that it renders optimally on a mobile device (e.g. it removes css styles and tables, and reduces the screen width).
However, there are certain sections of my site that I do not want to display on a mobile device, ? (e.g. flash games, videos, music)...
The mod that I purchased/installed on my site? has a "detect _ mobile _ device()"? function in a file called? "mobi le [login to view URL]". This function returns a true value if the sie is being accessed from a mobile device.
I would like to call this function from my html files (that render content for the screen), and use an "if..else" clause around sections of my site code, to control what is displayed on a screen,? but I am experiencing difficulty getting my code to work (I havent coded in php before).
What I tried in one of my HTML files was:
<?php
include("mobile [login to view URL]");
if(detect_mobile _ device() || $options['debug'] == 1){
}
else {
{Poll::RandomPoll}
}
?>
With this code I tried tried to utilise the detect_mobile_device function in such a way that a Poll does not appear on my mobile device. Result: I ended up with a blank page.
I need someone who has experience with PHPFOX to get this code to work on just one section of my site (I will provide access), and advise me how to set up my if..else clauses (so that I then know how to reuse it throughout my site)
## Deliverables
I have attached a sample html file that I tried to call/use this function in. I tried my code at the top of the file and it does not work. I need advice on how to properly call upon/use this code (successfully).