Page Index Toggle Pages: 1 Reply Send Topic
Hot Topic (More than 10 Replies) Template Link (Admin Center) (Read 11211 times)
 
Paste Member Name in Quick Reply Box XTC
Global Moderator
*****
Offline


YaBB 2.6.0/1/11 Mods

Posts: 174
Location: @ustria
Joined: Feb 12th, 2014
Gender: Male
Mood: Freaky
Zodiac sign: Aquarius
Template Link (Admin Center)
Jan 22nd, 2015 at 4:31pm
Mark & QuoteQuote  
Hello

I habe see that the "Template" Link is deactivate in the AdminIndex.pl  ....

Code (Perl)
Select All
    @forum_layout = (
         "|$admintxt{'a5_title'}|$admintxt{'a5_label'} - $admintxt{'34'}|a5",
         "modskin|$admintxt{'a5_sub1'}|$admintxt{'a5_label1'}|",
         "modcss|$admintxt{'a5_sub2'}|$admintxt{'a5_label2'}|",
 #        "modtemp|$admintxt{'a5_sub3'}|$admintxt{'a5_label3'}|",
     ); 



.... is that so wanted?

lg XTC
  

Back to top
 
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Template Link (Admin Center)
Reply #1 - Jan 22nd, 2015 at 5:56pm
Mark & QuoteQuote  
Yes - Assuming you have installed the 2.6.11 bug fix you'll see that link from within the template configuration screen instead.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box XTC
Global Moderator
*****
Offline


YaBB 2.6.0/1/11 Mods

Posts: 174
Location: @ustria
Joined: Feb 12th, 2014
Gender: Male
Mood: Freaky
Zodiac sign: Aquarius
Re: Template Link (Admin Center)
Reply #2 - Jan 22nd, 2015 at 7:48pm
Mark & QuoteQuote  
Ah ok  Wink
  

Back to top
 
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Template Link (Admin Center)
Reply #3 - Jan 22nd, 2015 at 8:05pm
Mark & QuoteQuote  
Believe it or not, there is a method to the madness - one of the things that will be happening in 2.6.2 will be separating the Template configuration/template editing code from the css configuration/editing code. We'll also be adding the ability to upload graphics from within YaBB. (I have the code about 3/4 done.)
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box XTC
Global Moderator
*****
Offline


YaBB 2.6.0/1/11 Mods

Posts: 174
Location: @ustria
Joined: Feb 12th, 2014
Gender: Male
Mood: Freaky
Zodiac sign: Aquarius
Re: Template Link (Admin Center)
Reply #4 - Jan 23rd, 2015 at 6:55pm
Mark & QuoteQuote  
Hello

@ManageTemplates.pm

Actual the open and print sub not realy work!

When i edit eg. Post.template .... the code in the file looks like this .....

Code
Select All
## Post Top
 $mypost_title = qq~{yabb my_topper}<table class="tabtitle">
     <tr>
         <td style="padding-left:1%">
             <img src="{yabb icon_img}" alt="" /> {yabb yytitle}
         </td>
     </tr>
 </table>
     {yabb my_topview}
 ~; 



.... after save the file the code looks this.

Code
Select All
## Post Top
 $mypost_title = qq~{yabb my_topper}<table class="tabtitle">
 <tr>
 <td style="padding-left:1%">
 <img src="{yabb icon_img}" alt="" /> {yabb yytitle}
 </td>
 </tr>
 </table>
 {yabb my_topview}
 ~; 



I have found a working code for open and save  Wink

In ManageTemplates "sub ModifyTemplate" find this code ...

Code (Perl)
Select All
    fopen( TMPL, "$templatesdir/$templatefile" );
     while ( $line = <TMPL> ) {
         $line =~ s/[\r\n]//gxsm;
         $line =~ s/&nbsp;/&#38;nbsp;/gxsm;
         $line =~ s/&amp;/&#38;amp;/gxsm;
         $line =~ s/^\s+//gsm;
         $line =~ s/\s+$//gsm;
         FromHTML($line);
         $fulltemplate .= qq~$line\n~;
     }
     fclose(TMPL); 



and replace with ....

Code (Perl)
Select All
    fopen( TMPL, "$templatesdir/$templatefile" );
     my $line = join("",<TMPL>);
     fclose(TMPL);
     for($x=0;$x<length($line);$x++){
     	$fulltemplate .= "&#" . sprintf("%03d",ord((substr($line,$x,1)))) . ";";
     } 



And in "sub ModifyTemplate2" replace this code ...

Code (Perl)
Select All
    $FORM{'template'} =~ tr/\r//d;
     $FORM{'template'} =~ s/\A\n//xsm;
     $FORM{'template'} =~ s/\n\Z//xsm;
     if   ( $FORM{'filename'} ) { $templatefile = $FORM{'filename'}; }
     else                       { $templatefile = 'default.html'; }
     fopen( TMPL, ">$templatesdir/$templatefile" );

     print {TMPL} "$FORM{'template'}\n" or croak "$croak{'print'} TMPL";
     fclose(TMPL); 



.... with this one!

Code (Perl)
Select All
    if   ( $FORM{'filename'} ) { $templatefile = $FORM{'filename'}; }
     else                       { $templatefile = 'default.html'; }
     fopen( TMPL, ">$templatesdir/$templatefile" );

     print {TMPL} "$FORM{'template'}" or croak "$croak{'print'} TMPL";
     fclose(TMPL); 


Check it out ....  Kiss

lg XTC
  

Back to top
 
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Template Link (Admin Center)
Reply #5 - Jan 23rd, 2015 at 8:28pm
Mark & QuoteQuote  
Thanks  Smiley - The problem with leading spaces not being properly saved/rendered had been driving me crazy.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Template Link (Admin Center)
Reply #6 - Jan 23rd, 2015 at 9:04pm
Mark & QuoteQuote  
Oops - we need
Code
Select All
    $FORM{'template'} =~ tr/\r//d;
     $FORM{'template'} =~ s/\A\n//xsm;
     $FORM{'template'} =~ s/\n\Z//xsm; 


in sub ModifyTemplate2

Otherwise extra new lines are added at the end of the lines.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box XTC
Global Moderator
*****
Offline


YaBB 2.6.0/1/11 Mods

Posts: 174
Location: @ustria
Joined: Feb 12th, 2014
Gender: Male
Mood: Freaky
Zodiac sign: Aquarius
Re: Template Link (Admin Center)
Reply #7 - Jan 23rd, 2015 at 9:14pm
Mark & QuoteQuote  
OK ... fine.  Smiley
  

Back to top
 
IP Logged
 
Paste Member Name in Quick Reply Box Bill Myers
Tester
***
Offline


Using YaBB since 2002

Posts: 89
Location: Los Angeles, CA
Joined: Feb 13th, 2014
Gender: Male
Awards: 1
Who Knows
Mood: Blessed
Zodiac sign: Aries
Re: Template Link (Admin Center)
Reply #8 - Feb 23rd, 2015 at 3:08pm
Mark & QuoteQuote  
Dandello wrote on Jan 22nd, 2015 at 5:56pm:
Yes - Assuming you have installed the 2.6.11 bug fix you'll see that link from within the template configuration screen instead.

Ah, now I see what's happened, I think. The main forum is down right now, so I came here to see why 2.6.11 doesn't have a template link. This is a bug, correct? And if so, the bug fix is here in this topic, right?

Just in case you weren't aware of it, if this is a bug that's gotten fixed, the fix hasn't been included with the current download for the 2.6.11 version yet.
  

Morning, noon, or night, have a great one!
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Template Link (Admin Center)
Reply #9 - Feb 23rd, 2015 at 3:25pm
Mark & QuoteQuote  
The download version at YaBBForum doesn't have any bug fixes - otherwise JonB would be zipping up a new version every week. I simply collect the bug fixes, put them into a mod and release it when there's more than one.

Users need to install the bug fixes.

I do expect a new zip by the end of the week.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Bill Myers
Tester
***
Offline


Using YaBB since 2002

Posts: 89
Location: Los Angeles, CA
Joined: Feb 13th, 2014
Gender: Male
Awards: 1
Who Knows
Mood: Blessed
Zodiac sign: Aries
Re: Template Link (Admin Center)
Reply #10 - Feb 23rd, 2015 at 3:34pm
Mark & QuoteQuote  
Thanks for the update. I appreciate it.

I know what you mean about finding bugs, and fixing them only to find there are more bugs to be found, and fixed. That's why I continue to use the 2.4 version. At least for me it's very stable, and it works well. At the same time, thanks to you and others who have been kind enough to have given me backdoor access to how 2.6.11 works, and now with my own backdoor access with a newly installed 2.6.11 version, I can see some terrific improvements that I'll want to enjoy at some point.

Thanks for having pushed ahead on YaBB's development (along with others having followed your lead). Based on what Zef has stated online about YaBB, he would surely be proud.

Edited:
XTC wrote on Jan 22nd, 2015 at 4:31pm:
#        "modtemp|$admintxt{'a5_sub3'}|$admintxt{'a5_label3'}|",

I reactivated that menu item, tested it, and can happily confirm that editing the default.html file worked just as well as the 2.4 version. I appreciate the fix. Smiley

Edited:
I subsequently added Dandello's fix, which she provided here in this post, so now an admin can have two places to edit the template file via the Admin Center. Cool


« Last Edit: Feb 24th, 2015 at 12:10am by Bill Myers »  

Morning, noon, or night, have a great one!
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Reply Send Topic
Bookmarks: del.icio.us Digg Facebook Google LinkedIn reddit Twitter Yahoo
Template Link (Admin Center)

Please type the characters exactly as they appear in the image,
without the first 2 and last 2 characters.
The characters must be typed in the same order,
and they are case-sensitive.
Open Preview Preview

You can resize the textbox by dragging the right or bottom border.
Off Topic Comment Insert Spoiler
Insert Hyperlink Insert FTP Link Insert Image Insert E-mail Insert Media Insert Table Insert Table Row Insert Table Column Insert Horizontal Rule Insert Teletype Insert Code Insert Quote Edited Superscript Subscript Insert List /me - my name Insert Marquee Insert Timestamp No Parse
Bold Italicized Underline Insert Strikethrough Highlight
                       
Change Text Color
Insert Preformatted Text Left Align Centered Right Align
resize_wb
resize_hb







Max 5000 characters. Remaining characters:
Text size: %
More Smilies
View All Smilies
Collapse additional features Collapse/Expand additional features Smiley Wink Cheesy Grin Angry Sad Shocked Cool Huh Roll Eyes Tongue Embarrassed Lips Sealed Undecided Kiss Cry