Page Index Toggle Pages: [1] 2 
Topic Tools
Hot Topic (More than 10 Replies) Adding Global Vars - How do I? (Read 4,156 times)
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: Adding Global Vars - How do I?
Reply #19 - Oct 1st, 2010 at 7:08pm
Post Tools
Cool! Looking smooth.

I've PM'd you back - the link you sent me wasn't working...
  
Back to top
 
IP Logged
 
Lopa
Junior Member
**
Offline



Posts: 95
Location: Australia
Re: Adding Global Vars - How do I?
Reply #18 - Oct 1st, 2010 at 7:35am
Post Tools
Derek Barnstorm wrote on Sep 30th, 2010 at 5:29pm:
What isn't working for you then?


Nothing! it just takes tike to find one's way around this thing - though I do have two niggerly problems for another thread. But all in all - it's nearly finished and I'll PM you Admin access so you can have a look around.

Wink

Quote:
Have you checked out Carsten's YaBB Mod Forum by the way?


I have been told about it - bit too early yet to be bothering someone else until I see what YaBB is all about!  Tongue

Even if you don't go for a look - These were the hardest ones to rewrite as far as nested goes - And I think I've got them all right!

Wink
  

yabb-ucp.png ( 158 KB | 77 Downloads )
yabb-ucp.png

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: Adding Global Vars - How do I?
Reply #17 - Sep 30th, 2010 at 5:29pm
Post Tools
Hi again Lopa,

Lopa wrote on Sep 30th, 2010 at 4:41am:
The XXXXXX gets replaced with {yabb vistatop - the ZZZZZZ with {yabb vistabottom

Too easy!  Grin

Oh, that's it? I thought you must have been trying to do something far more complicated than that. Cheesy

Lopa wrote on Sep 30th, 2010 at 4:41am:
I'm just doing the user CP (and that is something more complex than I expected - AND WHY I HATE NESTED TEMPLATES!Grin

Yeah, it can be a real pain going through all of the Perl files just to template, but I think they are hoping to eventually remove all of the HTML from them - hopefully it will be over the next couple of versions.

What isn't working for you then?



Have you checked out Carsten's YaBB Mod Forum by the way?

It's mainly a place to test his Mod's and tweaks and to discuss all things YaBB, but he's usually happy to answer questions regarding YaBB code and he's about the most knowledgeable person around here when it comes to that stuff. You might want to get yourself registered...
  
Back to top
 
IP Logged
 
Lopa
Junior Member
**
Offline



Posts: 95
Location: Australia
Re: Adding Global Vars - How do I?
Reply #16 - Sep 30th, 2010 at 12:21pm
Post Tools
Hi Mate, If you are "Playing" with it - here's an update:

Edited:


I thought I had something working in the way of theme-compliant .cfg files - But it's back to the drawing board....




But I'm slowly working on the programmers to consider a .cfg file for all the templates.  Grin
« Last Edit: Sep 30th, 2010 at 12:49pm by Lopa »  

I make mistakes - That's how I learn.
Back to top
WWW  
IP Logged
 
Lopa
Junior Member
**
Offline



Posts: 95
Location: Australia
Re: Adding Global Vars - How do I?
Reply #15 - Sep 30th, 2010 at 4:41am
Post Tools
hehehe!

Hang in there mate and I'll keep passing the changes I make to you and you can then create something new yourself using other than the transparent "vista" png's

Wink

The XXXXXX gets replaced with {yabb vistatop - the ZZZZZZ with {yabb vistabottom

Too easy!  Grin

I'm just doing the user CP (and that is something more complex than I expected - AND WHY I HATE NESTED TEMPLATES!Grin

But it's been worth it - - - and it's not all that far from being finished.  Cool
  

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: Adding Global Vars - How do I?
Reply #14 - Sep 30th, 2010 at 4:09am
Post Tools
Yeah, I get what you're doing with the X's and Z's - that does make good sense. But, forgive me for being stupid, what is it that you want to do once you have found all of the places that you want to add the start tags (X's) and end tags (Z's)?

Maybe someone else can jump in here because I'm afraid that still a little puzzled. Undecided

I like what you're doing with the site by the way, I'll be interested to see how it comes along.
« Last Edit: Sep 30th, 2010 at 4:16am by Derek Barnstorm »  
Back to top
 
IP Logged
 
Lopa
Junior Member
**
Offline



Posts: 95
Location: Australia
Re: Adding Global Vars - How do I?
Reply #13 - Sep 29th, 2010 at 9:21pm
Post Tools
Derek,

Yeah! it does get confusing? Particularly with me trying to explain it!  Grin

Be free to call me a "Taffy"  Tongue

Example: http://members.iinet.net.au/~cranky65/cgi-bin/forum/YaBB.pl

Have a look at "Help" and it may give you a better idea of what I mean with ZZZ's & XXX's. Because if one starts by dropping code into it, it gets into such a visual mess that's it makes it harder to see where things (tables/divs) start and finish.

Again with nested templates - one may end up with the front end Search looking good - but if it's nested with PM Search also - then it's better to use XXX's etc to determine where the code needs to be changed/added and whether or not one is breaking into something else other than the template one is working on.

But of course - By the time we ever get to CJ's level of experience - we'll wonder why it was ever done like this.  Roll Eyes

« Last Edit: Sep 30th, 2010 at 4:33am by Lopa »  

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: Adding Global Vars - How do I?
Reply #12 - Sep 29th, 2010 at 5:07pm
Post Tools
Lopa, I've read that about four times and I have to admit that I'm confused. Aren't the X's and Z's in that pic the effect you were after? Feel free to call me a pomme. Huh

Can you maybe attach the modified files so I can upload them to a test board to see what you mean...
« Last Edit: Sep 29th, 2010 at 5:16pm by Derek Barnstorm »  
Back to top
 
IP Logged
 
Lopa
Junior Member
**
Offline



Posts: 95
Location: Australia
Re: Adding Global Vars - How do I?
Reply #11 - Sep 29th, 2010 at 12:24am
Post Tools
Hi Derek,

Search.pl is one example of a multi-template file that either uses the same headers and footers, but sometimes uses one header and two footers or vice-versa because all Search templates may use the same file with a different header but the same footer or vice-versa etc.

Also adding the script directly into the file usually gets pretty frustrating because if it's wrong it's really WRONG! and usually breaks everything else. Sad

Using Search.pl as an example, I usually do it like this until I can see that nothing is missing - BUT only for the template I work on at the time because it certainly does make it less confusing than chasing all the other templates mentioned in the file.

I also always use (6) XXXXXX and (6) ZZZZZZ for the simple reason that I use Notepad++ to edit all the files at once with Search and Replace to add the actual script/vars, otherwise one finds oneself endlessly cutting an pasting script as they go along etc. (BORING!)

Something like this.

Code
Select All
<form action="$scripturl?action=search2" method="post" name="searchform" onsubmit="return CheckSearchFields();">
XXXXXX<table width="100%" align="center" border="0" cellpadding="4" cellspacing="1" class="bordercolor" >
	<colgroup>
		<col width="45%" />
		<col width="55%" />
	</colgroup>

_________________________________________________

Though preferably be changed and added like this.

<form action="$scripturl?action=search2" method="post" name="searchform" onsubmit="return CheckSearchFields();">
XXXXXX
<table width="100%" align="center" border="0" cellpadding="4" cellspacing="1" class="bordercolor" >
	<colgroup>
		<col width="45%" />
		<col width="55%" />
	</colgroup>

==========

Blah!

==========
		</td>
	</tr>
</table>ZZZZZZ
</form>


____________________________________

Though preferably be changed and added like this.
		</td>
	</tr>
</table>
ZZZZZZ
</form> 



ExtendedProfiles.pl is a CLASSIC example of nested templates - - - But the rules are for this MOD are:

Wherever the code (ZZZ XXX) is entered the script must start with a <div or <table and end with a /div> or /table>

The exception is if there is a <div class="bordercolor above the <table or the <div then it will more than likely need to added before that.

Post.pl is pretty easy - If you want to join in - Have a play with that and you'll soon get the message as in the pic.
« Last Edit: Sep 29th, 2010 at 12:28am by Lopa »  

yabb-x-z.png ( 3 KB | 98 Downloads )
yabb-x-z.png

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: Adding Global Vars - How do I?
Reply #10 - Sep 28th, 2010 at 11:16pm
Post Tools
If you can explain exactly what you mean and vision it working, I'll certainly try to help if I can, but making major changes to YaBB is way past me - I consider myself to be nothing more than a 'small time YaBB hacker' who makes simple modifications, but feel free to throw your ideas out and maybe we'll both learn something... Smiley
« Last Edit: Sep 28th, 2010 at 11:17pm by Derek Barnstorm »  
Back to top
 
IP Logged
 
Lopa
Junior Member
**
Offline



Posts: 95
Location: Australia
Re: Adding Global Vars - How do I?
Reply #9 - Sep 28th, 2010 at 9:39pm
Post Tools
What are you like working on nested templates in the .pl files?  Huh
  

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: Adding Global Vars - How do I?
Reply #8 - Sep 28th, 2010 at 9:27pm
Post Tools
No worries. Maybe I didn't totally understand what you were trying to do - Have clicked my personal remote to stand by anyhow. Smiley
« Last Edit: Sep 28th, 2010 at 9:29pm by Derek Barnstorm »  
Back to top
 
IP Logged
 
Lopa
Junior Member
**
Offline



Posts: 95
Location: Australia
Re: Adding Global Vars - How do I?
Reply #7 - Sep 28th, 2010 at 8:54pm
Post Tools
Derek Barnstorm wrote on Sep 28th, 2010 at 12:08am:
I think it's because you have a different folder name in each directory - the path and image need to be the same.


I know Derek that the paths must be consistent as in:

/a/vista
/b/vista
/c/vista and so on.  Wink

But what I have done for now is re-write the div's to be more in line with Transitional xhtml dtd and not strict - slapped the whole thing in the .css of each theme and it's all working fine.  So for now if it can be done with .css - that's the way I'll go. Smiley

Thanks for the insight you've given me so far into YaBB - But please stand by as I'm sure I'll be back with even more questions once I sort out how the heck I managed to pick up 2.4 files and mix them with the 2.5AE? I'm supposed to be working with.

Cry Cry Cry

It's all such fun!  Roll Eyes
  

I make mistakes - That's how I learn.
Back to top
WWW  
IP Logged
 
Lopa
Junior Member
**
Offline



Posts: 95
Location: Australia
Re: Adding Global Vars - How do I?
Reply #6 - Sep 28th, 2010 at 12:28am
Post Tools
Wow! Global config search for template images throws a new light on what I'm trying to do.  Cheesy

I think my problem is the /vista folder and the two theme scripts using the same var with hard-coded paths. - - - - I think!  Grin

I'll put the "vista" images in the same theme image folders and re-write the vars for a global result.

Will let you know how it goes!

Wink
  

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: Adding Global Vars - How do I?
Reply #5 - Sep 28th, 2010 at 12:08am
Post Tools
It works fine for me...

Have you actually uploaded the images to the other directory? The way it works is if it can't find the image, then it will always use the default directory, but if an image with the same name is in the yabb21 directory and the yabb21 template is selected then it will use that image instead... if that makes sense...

Edited:
I think it's because you have a different folder name in each directory - the path and image need to be the same.

This won't work:

default/vista/yourimage.png
yabb21/blue/yourimage.png

This will:

default/vista/yourimage.png
yabb21/vista/yourimage.png

And this:

default/yourimage.png
yabb21/yourimage.png

« Last Edit: Sep 28th, 2010 at 12:30am by Derek Barnstorm »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Topic Tools
 
  « Board Index ‹ Board  ^Top