Jump to content


Photo

misc tid bits


38 replies to this topic

#16 DA-G-GURU

DA-G-GURU

    Veteran

  • Members
  • PipPipPip
  • 1,177 posts
  • Gender:Male
  • Location:DAGrafixDesigns.com

Posted 09 July 2015 - 12:58 PM

Thanks TOS....as he took this script a bit further for me ;)

 

<!-- PREVENT OWNERS FROM LOADING HOMEPAGE MESSAGES AND SELECTING SKINS -->

<script type="text/javascript">
if(franchise_id=="0000") {
  $("#source_list > option[value*='MESSAGE']").show();
  $("h3 a:contains('Skin')").show();
  $("#options_01 a:contains('Skin')").show();

} else {
  $("#source_list > option[value*='MESSAGE']").remove();
  $("h3 a:contains('Skin')").remove();
  $("#options_01 a:contains('Skin')").remove();
}
  $("#body_options_93 .inputfield input[name*='HOME_LAYOUT']").parent().remove();
  $("#body_options_93 th.reallysmall:contains('Customize home page')").remove();
</script>

Simply The Best in Grafix and CSS webdesign since 2005

www.dagrafixdesigns.com

---------------
Twitter @DA_Sticks

#17 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,461 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 10 July 2015 - 09:09 AM

found 3 more tables missing captions and add to script in post 1 of the thread


FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#18 bonscott

bonscott

    Veteran

  • Members
  • PipPipPip
  • 7,878 posts
  • Gender:Male

Posted 13 July 2015 - 09:54 AM

I see your using that old scoreboard , here is the HPM for the revised one , i edited out all the crap in the script , and am loading the css in my main css to get it loaded faster then linking

 

** cut a lot of code **

 

So that code appears to just completely replace Habman's code and just uses a JS script on your site?  Just want to make sure I understand.



 


#19 DA-G-GURU

DA-G-GURU

    Veteran

  • Members
  • PipPipPip
  • 1,177 posts
  • Gender:Male
  • Location:DAGrafixDesigns.com

Posted 13 July 2015 - 10:20 AM

I see your using that old scoreboard , here is the HPM for the revised one , i edited out all the crap in the script , and am loading the css in my main css to get it loaded faster then linking

 

** cut a lot of code **

 

So that code appears to just completely replace Habman's code and just uses a JS script on your site?  Just want to make sure I understand.

 

 

Yes TOS new code is 100% on his server only.... (HPM.code....css and JS file)... Replaces Habman server..  So you would be correct.


Simply The Best in Grafix and CSS webdesign since 2005

www.dagrafixdesigns.com

---------------
Twitter @DA_Sticks

#20 bonscott

bonscott

    Veteran

  • Members
  • PipPipPip
  • 7,878 posts
  • Gender:Male

Posted 13 July 2015 - 01:30 PM

Thanks, what I needed to know.  So as I test this it'll be stand alone code basically and I'll see where it takes me.



 


#21 DA-G-GURU

DA-G-GURU

    Veteran

  • Members
  • PipPipPip
  • 1,177 posts
  • Gender:Male
  • Location:DAGrafixDesigns.com

Posted 14 July 2015 - 09:10 PM

TOS can you link this misc code thread to your code master area? Don't see it unless I overlooked it.

Thx bud :)
Simply The Best in Grafix and CSS webdesign since 2005

www.dagrafixdesigns.com

---------------
Twitter @DA_Sticks

#22 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,461 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 14 July 2015 - 09:19 PM

TOS can you link this misc code thread to your code master area? Don't see it unless I overlooked it.
Thx bud :)


It's there added this morning

FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#23 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,461 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 17 July 2015 - 10:32 AM

If your using the MFL History script , you may have noticed the MFL History didn't add a caption in the "Standings" tab area , so to conform that to look like all the rest of the MFL History reports , you can add this at the bottom of the MFL History script

 

<!-----  ADD CAPTION TO MFL HISTORY STANDINGS REPORT  ------>
<script type="text/javascript">
$( document ).ajaxComplete(function( event, xhr, settings ) {
  if ( settings.url.indexOf("recordtype=standings")>-1) {
    $('#mfl-standings #standings table').prepend('<caption><span>League Standings</span></caption>');
  }
});
</script> 

FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#24 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,461 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 23 July 2015 - 05:35 PM

This might be useful to some wanting to show , hide , add different style depending on if the user logged in is a commissioner / owner / guest. Add to header message

 

This will add a unique class tag to the body of each mfl page , which will allow you to use css to hide items based on user permissions.

 

All logged in owners will have a body.owners-only

Commissioner will have a body.commish-only

And guest will have a body.guest-only

<script type="text/javascript">
$(document).ready(function () {
  if((typeof franchise_id !== 'undefined') && (franchise_id >= parseInt("0000") || franchise_id<=parseInt("0096"))){
    $('body').addClass('owners-only');
      if(franchise_id=="0000") {
        $('body').addClass('commish-only').removeClass('owners-only');          
      }
  }
  else{
    $('body').addClass('guest-only');

    // REDIRECT ALL GUESTS TO THE LOGIN PAGE - NO CUSTOM HTML - CSS - SCRIPTS CAN BE SEEN BY ANY GUEST
    //var url = "http://%HOST%/%YEAR%/login?L=%LEAGUEID%&PRINTER=1";    
    //$(location).attr('href',url);
  }

// HERE YOU CAN PLACE FUNCTIONS TO REMOVE REPORTS FROM GUEST VIEW EXAMPLE BELOW
// $('.guest-only #league_chat').remove();

});
</script> 

 

 

Example of CSS to hide modules/reports using the new class added to determine login status (i prefer using the jQuery remove method in example area above , as it removes the HTML from the DOM , whereas CSS will not)

 

You don't want guest to read your chat , in your css , just add

.guest-only #league_chat {display:none;} /* ========  or use visibility:hidden;  ======== */ 

 

You want to make some notes in your homepage message and add to your homepage , but there is no need for anyone else to see it

.guest-only #your-custom-html-id ,.owners-only #your-custom-html-id {display:none;} /* ========  or use visibility:hidden;  ======== */ 

FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#25 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,461 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 24 July 2015 - 10:04 AM

added to above , if you don't want guest to be able to view / copy any of your custom CSS / Scripts / HTML , you can add this. This would redirect all guests to the printer friendly login page , where your owners can login to view the site , while guests can not login , nor be able to access any CSS , any HTML , any of your scripts

 

// REDIRECT ALL GUESTS TO THE LOGIN PAGE - NO CUSTOM HTML - CSS - SCRIPTS CAN BE SEEN BY ANY GUEST
//var url = "http://%HOST%/%YEAR%/login?L=%LEAGUEID%&PRINTER=1";    
//$(location).attr('href',url); 

FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#26 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,461 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 24 July 2015 - 04:23 PM

been asked this a dozen of times over the years and before i even knew what jQuery was , i always told people it couldn't be done....but alas i was just ignorant

 

If you want to add images , or link parts of your graphics on your team page graphic , you can do so. You can append any html you want to the team page , images , just links , then position the links or images where you want them. Each team page you modify would need done.

 

Example

<script type="text/javascript">
$(document).ready(function () {

  // WRAP FRANCHISE 1 TEAMPAGE AND ADD LINKS
  $('#body_options_01 #franchiselogo_0001').wrap('<div class="htmlfran1"></div>');
  $('.htmlfran1').append('<a class="fran1-link1" href="http://%HOST%/%YEAR%/options?L=%LEAGUEID%&O=247&SEQNO=8" title="View Youtube Video" target="_blank"></a><a class="fran1-link2" href="http://%HOST%/%YEAR%/options?L=%LEAGUEID%&O=247&SEQNO=8" title="View Youtube Video" target="_blank"></a><a class="fran1-link3" href="http://%HOST%/%YEAR%/options?L=%LEAGUEID%&O=247&SEQNO=8" title="View Youtube Video" target="_blank"></a>');

});
</script>


<style>
.htmlfran1 {position:relative;}
a.fran1-link1 {background:red;position:absolute;top:100px;left:0px;height:100px;width:100px;}
a.fran1-link2 {background:red;position:absolute;top:100px;left:140px;height:100px;width:100px;}
a.fran1-link3 {background:red;position:absolute;top:100px;left:280px;height:100px;width:100px;}
</style>

 

 

 

 

Example for 2 team pages , then you can add from there...

<script type="text/javascript">
$(document).ready(function () {

  // WRAP FRANCHISE 1 TEAMPAGE AND ADD LINKS
  $('#body_options_01 #franchiselogo_0001').wrap('<div class="htmlfran1"></div>');
  $('.htmlfran1').append('<a class="fran1-link1" href="http://%HOST%/%YEAR%/options?L=%LEAGUEID%&O=247&SEQNO=8" title="View Youtube Video" target="_blank"></a><a class="fran1-link2" href="http://%HOST%/%YEAR%/options?L=%LEAGUEID%&O=247&SEQNO=8" title="View Youtube Video" target="_blank"></a><a class="fran1-link3" href="http://%HOST%/%YEAR%/options?L=%LEAGUEID%&O=247&SEQNO=8" title="View Youtube Video" target="_blank"></a>');

  // WRAP FRANCHISE 2 TEAMPAGE AND ADD LINKS
  $('#body_options_01 #franchiselogo_0002').wrap('<div class="htmlfran2"></div>');
  $('.htmlfran2').append('<a class="fran2-link1" href="http://%HOST%/%YEAR%/options?L=%LEAGUEID%&O=247&SEQNO=8" title="View Youtube Video" target="_blank"></a><a class="fran2-link2" href="http://%HOST%/%YEAR%/options?L=%LEAGUEID%&O=247&SEQNO=8" title="View Youtube Video" target="_blank"></a><a class="fran2-link3" href="http://%HOST%/%YEAR%/options?L=%LEAGUEID%&O=247&SEQNO=8" title="View Youtube Video" target="_blank"></a>');
 

});
</script>

FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#27 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,461 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 24 July 2015 - 06:27 PM

example for last post - http://football26.my...ns?L=28696&O=01

 

instead of using graphic text for the player , created text links , and also hover on helmet image within the teampage for external link

 

 

script and css for example shown in demo

<script type="text/javascript">
$(document).ready(function () {
  $('#body_options_01 #franchiselogo_0001').wrap('<div class="htmlimg"></div>');
  $('.htmlimg').append('<a class="img-link1" href="http://%HOST%/%YEAR%/options?L=%LEAGUEID%&O=247&SEQNO=19" title="View Youtube Video" target="_blank">Dr. Football</a><a class="img-link2" href="http://%HOST%/%YEAR%/options?L=%LEAGUEID%&O=247&SEQNO=19" title="View Youtube Video" target="_blank">Kid Lightning</a><a class="img-link3" href="http://%HOST%/%YEAR%/options?L=%LEAGUEID%&O=247&SEQNO=19" title="View Youtube Video" target="_blank">Superfreak</a><a class="img-link4" href="http://%HOST%/%YEAR%/options?L=%LEAGUEID%&O=247&SEQNO=19" title="Link Helmet" target="_blank"></a>');
});
</script>

<style>
.htmlimg {position:relative;margin:0 auto;width:654px;} /* SET THIS WIDTH SAME AS YOUR IMAGE WIDTH */
.htmlimg a{color:#dea403;}
.htmlimg a:hover{color:#ffffff;}
a.img-link1 {position:absolute;top:320px;left:45px;}
a.img-link2 {position:absolute;top:320px;left:159px;}
a.img-link3 {position:absolute;top:320px;left:286px;}
a.img-link4 {position:absolute;top:210px;left:448px;height:150px;width:190px;}  /* TRANSPARENT LINK FOR THE HELMET IMAGE ON TEAMPAGE */
</style>
 

FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#28 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,461 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 24 July 2015 - 06:59 PM

just spinning the wheels a little , thoughts on making a popup like so....

 

if you click any franchise icon , a popup window displays (same as player popup) , and you have tabs where you can view that specific teams roster , schedule , offer a trade , and have a link to their homepage, as the MFL default does. Currently redirecting to the teams roster or homepage is just another wasted use of a link ,  but a popup with some team info might be a decent idea


FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#29 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,461 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 25 July 2015 - 09:08 AM

Did you know....

 

I was messing around this morning and found something very odd.  Any owner has the ability of load jQuery libraries , custom scripts , html , stylesheets via their  individual team page customize Other Franchise Notes input box.

 

So a owner can load crap in this box , that can effect all other owners view , wherever that owners team page is being loaded.

 

So if an owner where to put any css , like below , in their own personal customize box , it effects every other owners view of that page

<style>body {background:#000!important;}</style> 

I was also able to load scripts , that effected all other owners views , this should not be permitted imo , a disgruntled tech savy owner could load a script to crash any page that loaded their info on it , or inject stylesheets to disrupt the site flow.....

 

Example page - http://football26.my...ns?L=28696&O=01

 

notice Theeohiosate teampage - i loaded the script in a header message to add links to that image

 

Now scroll down to RollerCoasters team page - i loaded a jQuery library , a script , html and css to change the bg color to black , in that owners customize box , and it effects every owners view of the page , making the bg black on any page that his teampage is being loaded.


FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#30 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,461 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 09 August 2015 - 09:01 AM

limiting owners......load in any of your header messages

<script type="text/javascript">
$(document).ready(function () {
  if((typeof franchise_id !== 'undefined') && (franchise_id >= parseInt("0001"))){

    // PREVENT OWNERS FROM LOADING FRANCHISE ICON
    $('#body_options_197 .report tr.eventablerow:nth-child(3)').remove();
    $('#body_options_197 .report tr.eventablerow:nth-child(2)').remove();
    $('#body_options_197 .report tr.oddtablerow:nth-child(1)').remove();

    // PREVENT OWNERS FROM CHANGING THEIR TEAM NAME
    $('#body_options_50 .report tr:nth-child(1)').remove();

    // PREVENT OWNERS MAKING ANY CUSTOMIZATION TO THEIR TEAM PAGE AREA - IF USING THIS NO NEED FOR 3 LINE FUNCTION ABOVE PREVENTING OWNERS TO LOAD ICONS
    $('#body_options_01 .report tr.myoptions a:contains(Customize)').remove();

  }
});
</script>

FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users