phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

phpbb2FM portal links


 
Search this topic... | Search phpBB2 Discussion... | Search Box
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Author Message
wkdwich
Board Member



Joined: 24 Oct 2011

Posts: 29
Location: NY & VA


flag
PostPosted: Wed Oct 26, 2011 6:32 pm 
Post subject: phpbb2FM portal links

Last night I installed first EZ Portal and them IM Portal.. sorry world but the FM Portal is much more powerful - so I am back to tweaking that one up and crossing my fingers.. between the KB, Links and just the options on the portal itself, I really do like it..

So now.. when adding a new page in the portal, I have the option to
Use a current Forum
Use an external link in an iframe
Use an external link - no iframe

The No iframe choice opens within the same window.. I have searched for an hour now - it shouldn't be this hard icon_smile.gif - to find the code where the No iframe link is built and add:
target="_blank"

Anyone know where I should be looking???
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 414
Location: Québec


flag
PostPosted: Wed Oct 26, 2011 10:33 pm 
Post subject: Re: phpbb2FM portal links

It's either going to be in the page's .tpl file, or the .php file that generates it.
Back to top
wkdwich
Board Member



Joined: 24 Oct 2011

Posts: 29
Location: NY & VA


flag
PostPosted: Thu Oct 27, 2011 12:39 am 
Post subject: Re: phpbb2FM portal links

Yup knew that, actually found it now.. but the code doesn't differentiate between a forum link, a iframe link and an external url.

My coding skills are only so deep as to find sutff, sometimes make it work, not always correctly.. this one I am stumped on..

It's either a link or it isn't.. there is no place to choose if where it opens, same or _blank..

To test I had the right place I changed in root\templates\subSilver\portal_navbar.tpl
class="nav"
to
class="nav22"
and it showed up like that, so I know the template file is the correct one..

Then I searched for where the system picks up
U_NAVIGATE
and the root/portal.php is the only place

root/potral.php
Code:
   $display_navbar = $display_moreover = $display_calendar = $display_login = $display_online = $display_onlinetoday = $display_latest = $display_poll = $display_photo = $display_language = $display_theme = $display_search = $display_quote = $display_links = $display_ourlink = $display_downloads = $display_randomuser = $display_mostpoints = $display_topposters = $display_newusers = $display_games = $display_newsfader = $display_clock = $display_karma = $display_horoscopes = $display_wallpaper = $no_date = $sort_asc = $list_limit = 0;

   // Get the nav bar info
   for ($i = 0; $i < $total_nav; $i++)
   {
      $portal_id = $portal_rowset[$i]['portal_id'];
      $portal_url = append_sid('portal.'.$phpEx.'?page=' . $portal_id);
      
      if ($portal_rowset[$i]['portal_use_url'] && $portal_rowset[$i]['portal_use_iframe'])
      {
         $portal_url = $portal_rowset[$i]['portal_url'];
      }
      
      $portal_navbar_name = $portal_rowset[$i]['portal_navbar_name'];
      
      if ( $portal_rowset[$i]['portal_id'] != $page_id )
      {
      }
      else
      {
         // Get the page desc info and other config info
         $iframe_height = $portal_rowset[$i]['portal_iframe_height'];
         $page_forum = $portal_rowset[$i]['portal_forum'];
         $display_navbar = $portal_rowset[$i]['portal_navbar'];
         $display_moreover = $portal_rowset[$i]['portal_moreover'];
         $display_calendar = $portal_rowset[$i]['portal_calendar'];
         $display_login = $portal_rowset[$i]['portal_login'];
         $display_online = $portal_rowset[$i]['portal_online'];
         $display_onlinetoday = $portal_rowset[$i]['portal_onlinetoday'];
         $display_latest = $portal_rowset[$i]['portal_latest'];
         $display_latest_exclude_forums = str_replace(';', ',', $portal_rowset[$i]['portal_latest_exclude_forums']);
         $display_latest_amt = $portal_rowset[$i]['portal_latest_amt'];
         $display_latest_scrolling = $portal_rowset[$i]['portal_latest_scrolling'];
         $display_poll = $portal_rowset[$i]['portal_poll'];
         $display_polls = str_replace(';', ',', $portal_rowset[$i]['portal_polls']);
         $display_photo = $portal_rowset[$i]['portal_photo'];
         $display_search = $portal_rowset[$i]['portal_search'];
         $display_quote = $portal_rowset[$i]['portal_quote'];
         $display_links = $portal_rowset[$i]['portal_links'];
         $display_ourlink = $portal_rowset[$i]['portal_ourlink'];
         $display_downloads = $portal_rowset[$i]['portal_downloads'];
         $display_randomuser = $portal_rowset[$i]['portal_randomuser'];
         $display_mostpoints = $portal_rowset[$i]['portal_mostpoints'];
         $display_topposters = $portal_rowset[$i]['portal_topposters'];
         $display_newusers = $portal_rowset[$i]['portal_newusers'];
         $display_games = $portal_rowset[$i]['portal_games'];
         $display_newsfader = $portal_rowset[$i]['portal_newsfader'];
         $no_date = $portal_rowset[$i]['portal_nodate'];
         $sort_asc = $portal_rowset[$i]['portal_ascending'];
         $list_limit = $portal_rowset[$i]['portal_list_limit'];
         $char_limit = $portal_rowset[$i]['portal_char_limit'];
         $portal_column_width = $portal_rowset[$i]['portal_column_width'];
         $portal_links_height = $portal_rowset[$i]['portal_links_height'];
         $display_clock = $portal_rowset[$i]['portal_clock'];
         $display_karma = $portal_rowset[$i]['portal_karma'];
         $display_horoscopes = $portal_rowset[$i]['portal_horoscopes'];
         $display_wallpaper = $portal_rowset[$i]['portal_wallpaper'];
         $display_donors = $portal_rowset[$i]['portal_donors'];
         $display_referrers = $portal_rowset[$i]['portal_referrers'];
         $display_shoutbox = $portal_rowset[$i]['portal_shoutbox'];
         $page_title = $portal_navbar_name;   

         $template->assign_block_vars('pagedesc', array(
              'IFRAME_HEIGHT' => $iframe_height,
            'U_PORTAL_SITE_NAME' => $portal_rowset[$i]['portal_navbar_name'],
            'U_PORTAL_SITE_URL' => $portal_rowset[$i]['portal_url'])
         );
      }

      $template->assign_block_vars('navrow', array(
         'NAV_ALT' => $portal_navbar_name,
         'U_NAVIGATE' => $portal_url)


root\templates\subSilver\portal_navbar.tpl
Code:
<!-- BEGIN navrow -->
&nbsp;<a href="{navrow.U_NAVIGATE}" class="nav">{navrow.NAV_ALT}</a><br />
<!-- END navrow -->
<!-- BEGIN nonavrow -->
&nbsp;<span class="mainmenu">{L_NO_TOPICS}</span>
<!-- END nonavrow -->
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 414
Location: Québec


flag
PostPosted: Thu Oct 27, 2011 2:23 am 
Post subject: Re: phpbb2FM portal links

Well then it's right there:

root\templates\subSilver\portal_navbar.tpl
Code:
<!-- BEGIN navrow -->
&nbsp;<a href="{navrow.U_NAVIGATE}" target="_blank" class="nav">{navrow.NAV_ALT}</a><br />
<!-- END navrow -->


Unless you have links in navrow that you don't want to open in a new window?
Back to top
wkdwich
Board Member



Joined: 24 Oct 2011

Posts: 29
Location: NY & VA


flag
PostPosted: Thu Oct 27, 2011 2:45 am 
Post subject: Re: phpbb2FM portal links

Yes I saw a while back that is where the link is built, my problem is building the link differently dependant on the setup in the portal admin
internal page
portal page w/iframe
external <<-- this one ONLY in a new window or tab

thats exactly the issue.. Some I want to open fully in the same window.. some I want to open in the iframe in the same portal window and some I want in a NEW (_blank) window.. I suppose there is some coding needed to make that decision in the root/portal then moved to the portal_navbar.tpl ??

Honestly I have a lot going on at my site, its been around since 1994. My users are used to that happening and when the leave I want to give them the opportunity to come back icon_smile.gif

yes I could change that code to:

Code:
<!-- BEGIN navrow -->
&nbsp;<a href="{navrow.U_NAVIGATE}" target="_blank" class="nav" target=_blank">{navrow.NAV_ALT}</a><br />
<!-- END navrow -->


but then ALL the links open in new windows.. I only want select ones.. one chosen in the admin setup as iframe NO and external URL
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 414
Location: Québec


flag
PostPosted: Thu Oct 27, 2011 5:16 am 
Post subject: Re: phpbb2FM portal links

Well I'm still confused as to what all of this does, but basically what you need to do is:

1. In the following code, add a target definition:
Code:
$template->assign_block_vars('navrow', array(
         'NAV_ALT' => $portal_navbar_name,
         'U_NAVIGATE' => $portal_url,
         'U_TARGET' => $portal_target)


Defined earlier in a condition probably involving $portal_rowset[$i]['portal_use_iframe'], depending on when you want a link to open in a different window. I'd love to be more specific, but I don't know enough about the code, the output and the database fields. The value for $portal_target will either be "_self" or "_blank".

2. Insert the variable in your .tpl, as such:
Code:
&nbsp;<a href="{navrow.U_NAVIGATE}" target="{navrow.U_TARGET}" class="nav">{navrow.NAV_ALT}</a><br />
Back to top
Display posts from previous:   
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0159 seconds using 15 queries. (SQL 0.0064 Parse 0.0002 Other 0.0092)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo