Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 3rd, 2011  |  syntax: None  |  size: 4.85 KB  |  views: 143  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. ##################################################################
  3. # AVIA FRAMEWORK by Kriesi
  4.  
  5. # this include calls a file that automatically includes all
  6. # the files within the folder framework and therefore makes
  7. # all functions and classes available for later use
  8.                                                        
  9.  
  10. require_once( 'framework/avia_framework.php' );
  11.  
  12.  
  13. ##################################################################
  14.  
  15.  
  16.  
  17.  
  18. //register additional image thumbnail sizes that should be generated when user uploads an image:
  19. global $avia_config;
  20.  
  21. $avia_config['imgSize']['widget']               = array('width'=>48,  'height'=>48 );           // small preview pics eg sidebar news
  22. $avia_config['imgSize']['related']              = array('width'=>140, 'height'=>80);            // small images for related items
  23. $avia_config['imgSize']['portfolio']    = array('width'=>220, 'height'=>125);           // small preview pic for default portfolio (4 columns )
  24. $avia_config['imgSize']['portfolio2']   = array('width'=>460, 'height'=>260);           // medium preview pic for 2 column portfolio and small 3d slider
  25. $avia_config['imgSize']['portfolio3']   = array('width'=>300, 'height'=>170);           // medium preview pic for 3 column portfolio
  26. $avia_config['imgSize']['page']                 = array('width'=>620, 'height'=>200);           // image for pages and one column portfolio
  27. $avia_config['imgSize']['featured']     = array('width'=>940, 'height'=>350);           // big images for fullsize pages and fullsize 2D & 3D slider
  28.  
  29. //3d slider
  30. $avia_config['imgSize']['tablet_3D_welcome']    = array('width'=>400, 'height'=>315);   // medium preview pic for tablet 3d slider
  31.  
  32. /*preview images for special column sizes of the dynamic template. you can remove those if you dont use them, it will save performance while uploading images and will also save ftp storage*/
  33. $avia_config['imgSize']['grid6']                = array('width'=>460, 'height'=>125);           // half sized images when using 4 columns
  34. $avia_config['imgSize']['grid8']                = array('width'=>620, 'height'=>170);           // two/third image     
  35. $avia_config['imgSize']['grid9']                = array('width'=>700, 'height'=>125);           // three/fourth image
  36. $avia_config['imgSize']['grid_fifth1']  = array('width'=>172, 'height'=>100);           // one fifth
  37. $avia_config['imgSize']['grid_fifth2']  = array('width'=>364, 'height'=>100);           // two fifth
  38. $avia_config['imgSize']['grid_fifth3']  = array('width'=>556, 'height'=>100);           // three fifth
  39. $avia_config['imgSize']['grid_fifth4']  = array('width'=>748, 'height'=>100);       // four fifth
  40. ///////
  41.  
  42.  
  43.  
  44. avia_backend_add_thumbnail_size($avia_config);
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51. ##################################################################
  52. # Frontend Stuff necessary for the theme:
  53. ##################################################################
  54.  
  55. load_theme_textdomain('avia_framework');
  56.  
  57. /* Register frontend javascripts: */
  58.  
  59. wp_register_script( 'avia-default', AVIA_BASE_URL.'js/avia.js', array('jquery','avia-html5-video'), 1, false );
  60. wp_register_script( 'avia-prettyPhoto',  AVIA_BASE_URL.'js/prettyPhoto/js/jquery.prettyPhoto.js', 'jquery', "3.0.1", false);
  61. wp_register_script( 'avia-html5-video',  AVIA_BASE_URL.'js/projekktor/projekktor.min.js', 'jquery', "1", false);
  62.  
  63.  
  64.  
  65. /* Activate native wordpress navigation menu and register a menu location */
  66.  
  67. add_theme_support('nav_menus');
  68. register_nav_menu('avia', THEMENAME.' Main Menu');
  69.  
  70.  
  71. //load some frontend functions in folder include:
  72.  
  73. require_once( 'includes/admin/register-widget-area.php' );              // register sidebar widgets for the sidebar and footer
  74. require_once( 'includes/admin/register-portfolio.php' );                // register custom post types for portfolio entries
  75. require_once( 'includes/admin/register-styles.php' );                   // register the styles for dynamic frontend styling
  76. require_once( 'includes/admin/register-shortcodes.php' );               // register wordpress shortcodes
  77. require_once( 'includes/loop-comments.php' );                                   // necessary to display the comments properly
  78. require_once( 'includes/helper-slideshow.php' );                                // holds the class that generates the 2d & 3d slideshows, as well as feature images
  79. require_once( 'includes/helper-templates.php' );                                // holds some helper functions necessary for dynamic templates
  80.  
  81.  
  82. //activate framework widgets
  83. register_widget( 'avia_tweetbox');
  84. register_widget( 'avia_newsbox' );
  85. register_widget( 'avia_portfoliobox' );
  86. register_widget( 'avia_socialcount' );
  87. register_widget( 'avia_combo_widget' );
  88. register_widget( 'avia_partner_widget' );
  89.  
  90. //call functions for the theme
  91. add_filter('the_content_more_link', 'avia_remove_more_jump_link');
  92. add_post_type_support('page', 'excerpt');
  93.  
  94.  
  95. //allow mp4, webm and ogv file uploads
  96. add_filter('upload_mimes','avia_upload_mimes');
  97. function avia_upload_mimes($mimes){ return array_merge($mimes, array ('mp4' => 'video/mp4', 'ogv' => 'video/ogg', 'webm' => 'video/webm')); }
  98.  
  99. add_shortcode('img','avia_sc_img');
  100.  
  101. function avia_sc_img($atts, $content = "", $shortcodename = ""){
  102.                 return '<img src="'.$atts['src'].'" alt="" />';
  103.         }