Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Navigation link location
- $cache->setCache('vote_module_cache');
- if(!$cache->isCached('link_location')){
- $link_location = 1;
- $cache->store('link_location', '1');
- } else {
- $link_location = $cache->retrieve('link_location');
- }
- // Navigation icon
- $cache->setCache('navbar_icons');
- if(!$cache->isCached('forum_icon')) {
- $icon = '';
- } else {
- $icon = $cache->retrieve('forum_icon');
- }
- switch($link_location){
- case 1:
- // Navbar
- // Check cache for navbar link order
- $cache->setCache('navbar_order');
- if(!$cache->isCached('vote_order')){
- $vote_order = 4;
- $cache->store('vote_order', 4);
- } else {
- $vote_order = $cache->retrieve('vote_order');
- }
- $navigation->add('vote', $vote_language->get('vote', 'vote'), URL::build('/vote'), 'top', null, $vote_order, $icon);
- break;
- case 2:
- // "More" dropdown
- $navigation->addItemToDropdown('more_dropdown', 'vote', $icon . ' ' . $vote_language->get('vote', 'vote'), URL::build('/vote'), 'top', null);
- break;
- case 3:
- // Footer
- $navigation->add('vote', $icon . $vote_language->get('vote', 'vote'), URL::build('/vote'), 'footer', null);
- break;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement