內容簡介
此外掛可自動建立指向您的MyMiniCity網站的超連結,並顯示其數據。有多種設定和可編輯輸出選項。
鏈接到您的城市會根據城市需求進行更改。這些需求是通過閾值進行配置的。例如:如果您設置了一個工業閾值為5個失業,則失業率高達5%將被容忍。但是,此後工業鏈接將用於將人們引導到您的城市。
輸出內容頁面的HTML可以按照您的意願自定義。只需使用變量並按照自己的意愿構建HTML即可。
可用的變量可以在後端找到。
此外掛會緩存您城市的XML。它將每5分鐘更新一次。這是一種緩存機制,以避免每次加載您博客的頁面時都調用不同的網頁。
如果您只想要一個簡單的連結到您的城市,可以使用:
{minicity_link}
如果您想使用完整的HTML輸出,請使用:
{minicity}
用於php集成的代碼:
WPMC_getLink()
此函數將返回到您城市的鏈接。像這樣做:
if(function_exists('WPMC_getLink')){ echo '<a href="'.WPMC_getLink().'">MyCity</a>'; }
WPMC_displayCity()
此函數將輸出整個HTML。請像這樣使用它:
if(function_exists('WPMC_displayCity')){ echo WPMC_displayCity(); }
您可以像這樣向此函數傳遞不同的自定義HTML:
if(function_exists('WPMC_displayCity')){ echo WPMC_displayCity('<h1>%name%</h1>'); }
外掛標籤
開發者團隊
原文外掛簡介
Plugin that creates automatic links to you MyMiniCity and displays its data. Many settings and editable output.
The link to you city will be altered in regards of the city needs. Those needs are configurated by the thresholds. For example: If you set an industry threshold of 5 unemployment up to 5% will be tolerated. But after this the industry link will be used to direct people to your city.
The html output for content pages can be custimised in anyway you want. Just use the variables and build the html as you like.
The varaibles available can be found in the backend.
This plugin caches your cities XML. It will update only every 5 minutes. This is a caching mechanism to avoid calling to a different webpage everytime a page from your blog is loaded.
If you just want a simple link to your city you can use:
{minicity_link}
If you want the full html output use:
{minicity}
For php integration use:
WPMC_getLink()
This function will return the link to you city. Do something like this:
if(function_exists('WPMC_getLink')){ echo 'MyCity'; }
WPMC_displayCity()
This function will output the whole html. Use it like this:
if(function_exists('WPMC_displayCity')){ echo WPMC_displayCity(); }
You can pass a different custom html to this function like this:
if(function_exists('WPMC_displayCity')){ echo WPMC_displayCity('
%name%
'); }
