SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2010
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    what is this source code?

    what language is this source code?
    its client side stuff, sorry if its not exactly a php question but its for a php project
    http://www.twitch.tv/search?query=dryus#stq=dryus&stp=1
    on line 327, the part where they display the videos is confusing to me
    their variables for each video look like this {{path}}, {{thumbnail}}
    where are these variables coming from? ive checked all the other .js files linked in the page and cant find another reference to them
    i need to find the values of these variables, the browsers can translate them, so there must be a way for me to get them from looking at the source code
    Code:
    <script id='search-broadcasts' type='text/html'>
    <li class='broadcasts result archive video clearfix'>
    <div class='cap_and_profile'>
    <a class='thumb' href='{{path}}'>
    <img class='cap' src='{{thumbnail}}'>
    <a class='profile' href='{{profilePath}}'>
    <img class='p50' src='{{profileImage}}'>
    </a>
    </a>
    </div>
    <div class='video_meta'>
    <p class='title'>
    <img alt='Recorded' class='video_type' src='/images/xarth/g/g18_camera-00000080.png'>
    <a href='{{path}}'>
    {{title}}
    {{^title}}
    Untitled Broadcast
    {{/title}}
    </a>
    </p>
    <p class='video_stats search_topstats'>
    <span class='stat channelname'>
    on
    <a href='{{profilePath}}'>{{user}}</a>
    {{#game}}
    playing
    <a href='{{gamePath}}'>{{game}}</a>
    {{/game}}
    </span>
    </p>
    <p class='desc'>
    <span class='content'>{{description}}</span>
    </p>
    <p class='video_stats'>
    <span class='stat time_ago'>
    Recorded
    <time datetime='{{startTime}}'></time>
    </span>
    <span class='stat length'>{{length}}</span>
    <span class='stat views_count'>{{views}}</span>
    </p>
    </div>
    </li>
    </script>
    <div class='ad_leader search_leader'>
    <div class='advertisement'>
    <div class="ad_leader" id="Twitch_DirLeaderv2_holder" name="Twitch_DirLeaderv2"><div id="Twitch_DirLeaderv2_load_text"></div></div>
    <script>
      //<![CDATA[
        if (window.cbsiSlotConfigs == null) { window.cbsiSlotConfigs = {}; }
        cbsiSlotConfigs["Twitch_DirLeaderv2"] = {
          'SP': '15',
          'POS': '300',
          'WIDTH': '970',
          'HEIGHT': '66',
          'AD_SZ': '728wX90h',
          'CALLBACK': {
              onload: function(params) {
                  if (params.isBlank === "1") {
                      $("#Twitch_DirLeaderv2_holder").parents().find(".advertisement").addClass("hidden_ad");
                  }
              }
          }
        };
      //]]>
    </script>

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,044
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Looks like a template engine. Doesn't look familiar to me. Probably something home grown. You are probably going to need to go dig through the php source to find out. Does the software run a framework or CMS of any kind.
    The only code I hate more than my own is everyone else's.

  3. #3
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,148
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Looks like mustache.js.
    "First make it work. Then make it better."


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •