XenForo 1.2 You ll find the phpinfo() when you log into your admin panel and than add the following parameter to the admin url admin.php?tools/phpinfo
There is no direct link to it in the admin panel, so thats a really “nice to know”.
XenForo 1.2 You ll find the phpinfo() when you log into your admin panel and than add the following parameter to the admin url admin.php?tools/phpinfo
There is no direct link to it in the admin panel, so thats a really “nice to know”.
[gard]
Often i have to replace clearly identifiable strings (strings, text) with a new string in a MySQL column. Either its possible to use php, read the DB content and use str_replace() for string replacement, there is a much better way:
Thank God, MySQL offers a native REPLACE() function therefore:
Returns the string str
with all occurrences of the string from_str
replaced by the string to_str
. REPLACE()
performs a case-sensitive match when searching for from_str
.
In this example i replace all appearance of the string [youtube] with an empty string in the column xf_post of my XenForo database:
UPDATE xf_post SET message = REPLACE(message, '[/youtube]', '') WHERE message LIKE '%[/youtube]%';
[gard]
In this article, you will find the step-by-step tutorial you can follow to achieve a DIY 2DOF simulator for 700€ : dozen of pictures, videos…
This is the link to my original post from Gamoover:
http://www.gamoover.net/Forums/index.php?topic=27617.0
Same link: English translated by google
[gard]
A dynamic simulator which integrates the driver, the seat, pedals and steering wheel (but not the screens!)
The two axes (2DOF: Two Degrees of Freedom) are Roll and Pitch.
The principle is inspired by the commercial model from Frex http://www.frex.com
but with gearmotors (wiper motor + rod) replacing the electric linear actuators.
A glogal overview of the electrical stuff:
This simulator requires an additional software to extract games telemetry data and send the data to the motors: Simtools can be downloaded here
Pc #1 (graphic card “7970 lightning”, Windows 7) :
– The car games (Dirt3, rFactorLite and Richard Burns Rally)
– SimTools GameEngine
PC #2 (Recycling) connected via a crossover cable RJ45 to PC #1
– SimTools GameManager
An Arduino card linked to computer #2 with a USB cable.
The Arduino controls the MotoMonster shield “motor driver board”.
The power board Sparkfun “MotoMonster” drives the two motors (12V 47A = 575W) according to the instructions of the Arduino (5V 5mA = 25 mW).
For simplicity, the motor driver board is equivalent to 4 relays:
driving the right motor forward this means mounting the right side,
driving the right motor in the other direction this means lowering the right side,
driving the left motor forward this means mounting the left side,
driving the left motor in the other direction this means lowering the left side,
An arduino program (C language)
This program interprets the data sent via serial port by SimTools and sends it to the motor control board.
It performs a feedback control by reading the values of the potentiometer coupled to the motors :
-> The actual position is compared to the setpoint, and this will create a new updated order sent to the MotoMonster card.
This feedback loop is performed every 80 ms.
A heavy 12V Power Supply Unit about 30A. Electric Motors
2 Truck Wiper Motors for actuating the movable platform, with their positioning potentiometer (for feedback).
– the frame
the frame rests on the ground and supports the movable platform via a motor drive shaft (U joint).
– the moving part: the “cockpit”
– A true racing bucket seat (tubular). The fiber seats are lighter but more expensive.
– A harness! important to feel the seat movements and for realism of immersion
– Force Feedback steering wheel and pedals
The dimensions
Here are the quotations to give you an idea :
It was very convenient to have the bucket seat’s mounting plate: I drilled the structure easily!
Power Drill and a conical tool to adjust the hole to good diameter
Take care to ensure the shaft ‘s squareness : it has to be vertical !
http://gamoovernet.pixhotel.fr/pics_gamoovernet690px/20130401124851-RacingMat-cardan-et-chassis-3-.JPG
Then I crossed the bars at 45 ° to triangulate my frame :
The gimbal (U joint) is blocked in rotation along the yaw axis.
the gimbal assembly:
which gives this 🙂
and this
[gard]
Use the following configuration file to run your XenForo forum installation delivered by the Nginx webserver with friendly urls:
The rules are very simple:
Open your nginx.conf (You often in /etc/nginx):
Inside the server block {} insert two location related sections:
location / { try_files $uri $uri/ /index.php?$uri&$args; } location ~ /(internal_data|library) { internal; }
The first location block specifies the url rewriting process. The second location part prevents external access to the internal XenForo related data structures. Thats for security purposes of the forum installation.
If you forum is located within a subfolder like e.g. domain.com/forum or domain.com/community just add the name of the subfolder to the location parts:
location /forum/ { try_files $uri $uri/ /forum/index.php?$uri&$args; } location ~ /forum/(internal_data|library) { internal; }
Restart the nginx webserver.
All done. Your XenForo installation should be running fine now with search engine friendly urls like domain.com/forum/this-is-my-post.2
[gard]
[gard]
Sometimes its necessary to give your posts or pages switches to turn on and off specific template elements on your site. WordPress makes it really easy:
If not already done, activate the Custom fields on the Screen Options menue at the upper right corner of your post:
Than create any field and value, e.g.:
Name: hide-author
Value: 0
You can call the name as you want it. We define it in the template next.
Now we open content.php and go to line 60:
<?php if ( is_single() && get_the_author_meta( 'description' ) && is_multi_author() ) :?> <?php get_template_part( 'author-bio' ); ?> <?php endif; ?>
Change it so something like:
if ( is_single() && get_post_meta($post->ID, 'hide-author', true) != '1') : ?> <?php get_template_part( 'author-bio' ); ?> <?php endif; ?>
As you can see, you can grab the new custom field and create a condition with:
get_post_meta($post->ID, 'hide-author', true) != '1')
Now you can specify in all your posts and pages if you like to disable or enable the author box. Very easy!
[gard]
Quickstart Guide for SimTools!
Guide for SimTools 2 will be updated soon!
Following this, step after step, is a quick way to achieve your first basic functional setup and make your simulator come alive.
For detailed explanation use the complete user guide:
http://www.xsimulator.net/simtools-complete-documentation/
Find a russian translated version at:
http://mal4x.ru/viewtopic.php?f=6&t=379
A LITTLE ABOUT SIMTOOLS
SimTools is designed to be a simple set of tools that work together to get motion simulators up and running as fast as possible while still giving the user all of the customizations and flexibility they may need.
One really cool thing SimTools will allow you to do is “Live Tuning of Profiles”! Create a profile for a game and then tune the profile to perfection while playing the game!
You don’t have to stop the game to make changes to the profile being used!
A LITTLE ABOUT THIS GUIDE…
Just follow this step-by-step guide from points 1 to 10 and you will make your simulator move accordingly to the default profile! Enjoy!
a) Mandatory :
b) Optional :
Please follow these all of these steps consecutively:
first: downloads
second: SimTools installation in detail
a) Definitions
If your simulator is powered by several actuators. Consider that each actuator is seen by Sim Tools as an Axis. SimTools can extract up to 9 telemetry data (“DOF 1” to “DOF 9”) from the games and can handle up to 6 actuators (“Axis1” to “Axis6”).
This step in the tutorial will let you indicate to Sim Tools the data mixing to operate before sending instructions to your simulator’s interface along to your simulator configuration. Some standard configuration is preset: e.g “SimForce GT” is a seat mover with two motors connected to the back of your seat.
b) Setting up the “Default” axis assignments
First, we must define the “Default” settings that we want SimTools to use, later you can customize this.
The tab automatically switches back to Axis Assignments Tab 1
This is a first very basic setup showing just the roll and pitch from the game.
With more experience, you can also add some % of Surge to simulate acceleration and braking or Heave for road bumpiness.
c) Warning
Be sure to set up your “Default” Axis Assignments profile as this becomes the first game profile when you install a new game plugin:
Remember:
Sim Tools supports up to 6 different interfaces!
They are selectable in the 6 tabs
Interface 1 – Interface 6.
a) How many interfaces are needed?
For a 2 DOF “SimForceGT”, there is only need for 1 interface if you use an arduino board which is able to drive 2 actuators.
The following steps are only for example purposes and treat the Arduino and JRK interfaces. There are another interface available, e.g. SimAxe or Kangaroo Controller. Look in the forum for more information about it.
Example setup for Arduino:
[gard]
Arduino is connected to Windows COM3
SimTools “Interface 1” sends to COM3 the concatenated information of Axis 1 and of Axis 2.
Arduino will dispatch the data sending Axis 1 orders to Actuator 1 and Axis 2 orders to Actuator 2
Example setup for JRK interface
You need 2 JRK 12v12 boards. Each JRK drives its own actuator
Refer to Eaorobbie’s post here for step by step startup
b) Possible types of interfaces
Basically, you will use “USB Serial interface” to control your Arduino or JRKs.
(NET interfaces are used for LAN connected interfaces: this is not described in this Quick Starting guide).
Click on the Interface Settings button.
c) JRK Game Engine interface settings
Click on Save
Click Save
d) ARDUINO Game Engine interface settings
Interface 1 only:
Thanks @nclabs
Let’s move your simulator without any game input with simply using your mouse!
Its is recommended to test first manually your simulator before testing any game output.
Click on Turn on
Select Axis Output
Now, choose an Axis and slide gently the slider with your mouse!
As an Axis corresponds to an actuator, you will see the selected actuator moving!
Axis limitation is not active for this testing purpose.
The smoothness depends on the refresh rate (try below 10 ms).
Now we need to test that the simulator behaves correctly: if the game plugin sends “tilt left”, the simulator has to tilt left and not right!
You can invert the motor wiring … or invert the DOF in the “Axis Assignments” 😉
With the slider, we will manually make sure that it is rolling and pitching in the right directions.
For this example we find
Roll : 100% – Tilts Left
Roll : – 100% – Tilts Right
Pitch : 100% – Tilts Forwards
Pitch : – 100% – Tilts Backwards
We have to follow the coordinate system that is in place in the Sim Tools Plugin API reference – see http://www.xsimulator.net/co-ordinate-system/
We know from that in Virtual Axis when it Tilts Left – Roll is all the way Left
Tilts Right – Roll is all the way Right
Tilts Forward – Pitch is all the way Left
Tilts Backwards – Pitch is all the way Right
Virtual Axis can be found next to the “Axis Testing” tab and can be turned on by pressing “Turn On”
So to correct to the coord’s we need to invert the Roll and invert the Pitch or our games will not produce the right directions of movement.
Once we have this all set up including Heave, Sway and Surge we can then go on and patch a game and begin to test the motion and fine tune it to your Sim.
Click on Output Testing.
Don’t connect the motors yet.
If everything is set-up correctly the sliders should be moving.
You can now see that SimTools can read the Game data!
Note: If you only want to test the slider movements and don’t have 6 ComPorts, just write
<Axis1><Axis2><Axis3><Axis4><Axis5><Axis6>
into the Interface – Output line.
[gard]
A) security approach
The first step, the Security approach: in order to preserve your hardware, begin the test by lowering the range and the intensity
B) The second step, starting the sequence:
C) Increase the levels:
– Don’t Skip –
Increase the levels until simulator’s movements are satisfying.
For Best Performance, make sure the profiles Main Level is back to 100%. Also make sure that your simulator Axes Limiting are set back to 100% once you are all setup. SCN actuators may want to leave the Axes Limiting at 90% to avoid damage to the actuators rod ends.
Congratulations, you have now completed the Quick Start Manual!
Please refer to Complete Documentation
http://www.xsimulator.net/simtools-complete-documentation
One of the best source for a responsive easy adaptable responsive multi column layout is http://www.responsivegridsystem.com
It´s not a bloated framework, neither a boilerplate or similar. It´s just a little bunch of very smart code to create a responsive div layout. I´ll use it at the frontpage of XSimulator.net.
Just a example for a responsive three column layout:
HTML:
<div class="col span_1_of_3">Column 1</div> <div class="col span_1_of_3">Column 2</div> <div class="col span_1_of_3">Column 3</div>
CSS
/* Reset - Responsive first */ .col:first-child { margin-left: 0; } .col { display: block; float: left; margin: 1% 0 1% 1.6%; } .span_1_of_3 { width: 31.7%; } /* non responsive */ @media (max-width: 643px) { .span_1_of_3 { width: 100%; } .col { margin: 1% 0 1% 0%; } }
Result: (Scale your browser to see it responsive):
Open your theme functions.php and add the following code:
function xsimu_breadcrumb() { echo ' <ul id="breadcrumbs">'; if (!is_home()) { echo '<li> <a href="'; echo get_option('home'); echo '">'; echo 'Home'; echo "</a><span class='separator'>»</span></li>"; if (is_category() || is_single()) { echo ' <li>'; the_category('<span class="separator">»</span></li><li> '); if (is_single()) { echo "</li><li><span class='separator'>»</span>"; the_title(); echo '</li>'; } } elseif (is_page()) { echo '<li>'; echo the_title(); echo '</li>'; } } elseif (is_tag()) {single_tag_title();} elseif (is_day()) {echo"<li>Archive for "; the_time('F jS, Y'); echo'</li>';} elseif (is_month()) {echo"<li>Archive for "; the_time('F, Y'); echo'</li>';} elseif (is_year()) {echo"<li>Archive for "; the_time('Y'); echo'</li>';} elseif (is_author()) {echo"<li>Author Archive"; echo'</li>';} elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {echo "<li>Blog Archives"; echo'</li>';} elseif (is_search()) {echo"<li>Search Results"; echo'</li>';} echo '</ul>'; }
Add the following function in one of your templates. Most times you will use the header.php
<?php xsimu_breadcrumb(); ?>
Congratulations. You are done;)
In WP older than 3.6 it´s possible to deactivate or limit revisions in WordPress with the entry
define('WP-POST_REVISIONS', 100);
It seems that it is not working any longer in WP 3.6. Fortunately there is a nice little plugin that works very reliable and is able to delete a whole bunch of old revisions between two dates:
http://wordpress.org/plugins/thin-out-revisions/screenshots/
When i started the creating process of this theme i considered to integrate one of the popular WordPress plugins for pagination. I than decided to publish the XSimulator theme for free and i felt that it could lead to any problems and issues for someone else to make a similar looking theme when the requirements are a lot of different plugins he must install first. Fortunately i found a great programmed script which is very easy to implement and powerful.
Open your functions.php and create a new function:
/* Adds pagination * * @since XSimulator 1.0 * @param $range total list of pages * @param $range count of maximum page links from left and right side of the current page link. * @bool $show_one_page_hint shows a text like: page 1 of 6 * @bool $show_one_pager Do not show nav arrows * */ function xsimu_pagination($range = 3, $show_one_pager = true, $show_page_hint = false) { global $wp_query; $num_of_pages = (int)$wp_query->max_num_pages; if(!is_single() && $num_of_pages > 1) { $current_page = get_query_var('paged') === 0 ? 1 : get_query_var('paged'); $num_of_display_pages = ($range * 2) + 1; $output = '<div id="pagination">'; if($show_page_hint) { $output .= '<span>Page ' . $current_page . ' of ' . $num_of_pages . '</span>'; } if($current_page > 2 && $current_page > $range + 1 && $num_of_display_pages < $num_of_pages) { $output .= '<a href="' . get_pagenum_link(1) . '" title="Page 1 - Latest article">«</a>'; } if($show_one_pager && $current_page > 1) { $output .= '<a href="' . get_pagenum_link($current_page - 1) . '" title="Page ' . ($current_page - 1) . ' - Latest Artikel">‹</a>'; } for($i = 1; $i <= $num_of_pages; $i++) { if($i < $current_page + $range + 1 && $i > $current_page - $range - 1) { if($current_page === $i) { $output .= '<span class="current">' . $i . '</span>'; } else { $output .= '<a href="' . get_pagenum_link($i) . '" title="Page ' . $i . '" >' . $i . '</a>'; } } } if($show_one_pager && $current_page < $num_of_pages) { $output .= '<a href="' . get_pagenum_link($current_page + 1) . '" title="Page ' . ($current_page + 1) . ' - Older article">›</a>'; } if($current_page < $num_of_pages - 1 && $current_page + $range < $num_of_pages && $num_of_display_pages < $num_of_pages) { $output .= '<a href="' . get_pagenum_link($num_of_pages) . '" title="Page ' . $num_of_pages . ' - Older article">»</a>'; } $output .= '</div>'; return $output; } }
Open the template file where you want to publish your pagination. E.g. category.php
echo xsimu_pagination(2, true, false);
You´re ready:)
Thanks to the author of the original script on the page smart-webentwicklung.de