Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Template Link (Admin Center) (Read 19419 times)
Bill Myers
New Member
*
Offline


Using YaBB since 2002

Posts: 46
Location: Los Angeles, CA
Joined: Feb 13th, 2014
Gender: Male
Re: Template Link (Admin Center)
Reply #10 - Feb 23rd, 2015 at 3:34pm
Print Post  
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
 
Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 1759
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Re: Template Link (Admin Center)
Reply #9 - Feb 23rd, 2015 at 3:25pm
Print Post  
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
 
Bill Myers
New Member
*
Offline


Using YaBB since 2002

Posts: 46
Location: Los Angeles, CA
Joined: Feb 13th, 2014
Gender: Male
Re: Template Link (Admin Center)
Reply #8 - Feb 23rd, 2015 at 3:08pm
Print Post  
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
 
XTC
Global Moderator
*****
Offline


YaBB 2.6.0/1/11 Mods

Posts: 159
Location: @ustria
Joined: Feb 12th, 2014
Gender: Male
Re: Template Link (Admin Center)
Reply #7 - Jan 23rd, 2015 at 9:14pm
Print Post  
OK ... fine.  Smiley
  

Back to top
 
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 1759
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Re: Template Link (Admin Center)
Reply #6 - Jan 23rd, 2015 at 9:04pm
Print Post  
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
 
Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 1759
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Re: Template Link (Admin Center)
Reply #5 - Jan 23rd, 2015 at 8:28pm
Print Post  
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
 
XTC
Global Moderator
*****
Offline


YaBB 2.6.0/1/11 Mods

Posts: 159
Location: @ustria
Joined: Feb 12th, 2014
Gender: Male
Re: Template Link (Admin Center)
Reply #4 - Jan 23rd, 2015 at 6:55pm
Print Post  
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
 
Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 1759
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Re: Template Link (Admin Center)
Reply #3 - Jan 22nd, 2015 at 8:05pm
Print Post  
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
 
XTC
Global Moderator
*****
Offline


YaBB 2.6.0/1/11 Mods

Posts: 159
Location: @ustria
Joined: Feb 12th, 2014
Gender: Male
Re: Template Link (Admin Center)
Reply #2 - Jan 22nd, 2015 at 7:48pm
Print Post  
Ah ok  Wink
  

Back to top
 
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 1759
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Re: Template Link (Admin Center)
Reply #1 - Jan 22nd, 2015 at 5:56pm
Print Post  
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
 
XTC
Global Moderator
*****
Offline


YaBB 2.6.0/1/11 Mods

Posts: 159
Location: @ustria
Joined: Feb 12th, 2014
Gender: Male
Template Link (Admin Center)
Jan 22nd, 2015 at 4:31pm
Print Post  
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
 
Page Index Toggle Pages: 1
Send TopicPrint