Page Index Toggle Pages: 1
Topic Tools
Normal Topic How do I qualify a yabb var in default.html (Read 1,092 times)
Lopa
Junior Member
**
Offline



Posts: 95
Location: Australia
Re: How do I qualify a yabb var in default.html
Reply #2 - Oct 4th, 2010 at 8:48am
Post Tools
Thanks again Derek,

If anyone's blood is worth bottling - It's yours!  Wink

To be honest I haven't been to the Mods Database to see if anyone has ever done anything with this, but from what I read into the .pl files - It seems people are kind of being forced to build themes around a Menu?  Cry

YaBB wants to move to pulling the html out of the .pl - This would be a good place for them to start, because I'm sure that all of the Menu vars are not going to function if one simply calls it in the header.  Cry

Anyway, I moved some other things around and re-wrote the header as best I could with what I've got to play with!  Grin

Still a couple of <br>'s in the perl script that annoy me - But that's for another thread.

Grin Wink Grin
  

I make mistakes - That's how I learn.
Back to top
WWW  
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: How do I qualify a yabb var in default.html
Reply #1 - Oct 4th, 2010 at 12:30am
Post Tools
Hi again,

I was waiting to see if anyone could help you with this, but seeing as they haven't, I hope you don't mind getting me again.

Anyway, I really can't help you 100% with this, all I can do is share my little (and maybe dangerous) knowledge.

The shared login variable is template specific to the board index, and is done in these two places in BoardIndex.pl:

Code (Perl)
Select All
    my $shared_login;
    if ($iamguest) {
        require "$sourcedir/LogInOut.pl";
        $sharedLogin_title = '';
        $shared_login = &sharedLogin;
    } 


Code (Perl)
Select All
    $boardindex_template =~ s/({|<)yabb sharedlogin(}|>)/$shared_login/g; 


So, the only way I can think of doing it is to remove (or maybe better to comment out) the above code from BoardIndex.pl and then make it a global variable in Subs.pl somewhere in the template sub. So something like this:

In Subs.pl find:

Code (Perl)
Select All
<script language="JavaScript1.2" type="text/javascript" src="$yyhtml_root/YaBB.js"></script>
~; 


And add after:

Code (Perl)
Select All
    my $shared_login;
    if ($iamguest) {
        require "$sourcedir/LogInOut.pl";
        $sharedLogin_title = '';
        $yyshared_login = &sharedLogin;
    } 


And you know the rest after that.

But, here's the part I'm not too sure how to get to work... Usually when you login it will redirect you to the page that you were on before you logged in - It's done through a hidden form field in the sharedlogin sub in LogInOut.pl, but I really don't know how to pass it with what you want to do, so the redirect won't work. As I say, I'm afraid I can't help you 100% with this.

Anyway, that might at least give you some sort of idea what you need to do, and hopefully someone who knows for sure can tell you more... and as always, I have only tested quickly so don't know what other problems might arise...
« Last Edit: Oct 4th, 2010 at 12:43am by Derek Barnstorm »  
Back to top
 
IP Logged
 
Lopa
Junior Member
**
Offline



Posts: 95
Location: Australia
How do I qualify a yabb var in default.html
Oct 3rd, 2010 at 12:46am
Post Tools
Edit:

I keep forgetting that this is perl and not php - - - -  Cry and that login probably wont work in the header? Cry

But! if there's a way to do it - I'm all ears!


I'm stuck because my in-depth ignorance of YaBB is starting to show through.  Cry

I've restyled Login Out - Dropped the shared login and the javascript links from Subs.pl - and TabMenu.pl because I want to move what's in the pic to just under the Menu?

I note that some vars can work in default.html and some don't - These DON'T! and why not has got me beat? Grin

Code (Perl)
Select All
$yysharedlogin
{yabb sharedlogin} 



So how do I get either to work in the default.html? Please! Cool

« Last Edit: Oct 3rd, 2010 at 8:10pm by Lopa »  

yabb-login.png ( 28 KB | 81 Downloads )
yabb-login.png

I make mistakes - That's how I learn.
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top