Advertisement
Guest User

Untitled

a guest
May 28th, 2017
520
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.64 KB | None | 0 0
  1. From bb19f4fd792128a4573e35c0bcd6343d7d0a0fb5 Mon Sep 17 00:00:00 2001
  2. From: Anders Ladegaard Marchsteiner <alm@2ndeffect.dk>
  3. Date: Tue, 1 Jun 2010 10:28:25 +0200
  4. Subject: [PATCH] Enable selecting of frontpage performances. Initial start of manuel ordering of$
  5.  
  6. ---
  7. .gitignore | 1 +
  8. forestillinger.phtml | 7 ++-
  9. frontpage.phtml | 131 +++++++++++++++++++++++++++++++++++++++++++++++---
  10. includes/styles.css | 13 ++++--
  11. 4 files changed, 140 insertions(+), 12 deletions(-)
  12.  
  13. diff --git a/.gitignore b/.gitignore
  14. index b25c15b..74c36c8 100644
  15. --- a/.gitignore
  16. +++ b/.gitignore
  17. @@ -1 +1,2 @@
  18. *~
  19. +\#*\#
  20. diff --git a/forestillinger.phtml b/forestillinger.phtml
  21. index 94b456f..89e55eb 100755
  22. --- a/forestillinger.phtml
  23. +++ b/forestillinger.phtml
  24. @@ -26,7 +26,8 @@
  25. theme_advanced_resizing : false,
  26. theme_advanced_text_colors : "#ff9933,#8e4a27,#ce5124,#ce246d,#001467,#5e6700,#d9e74a,#4639ce,#353009,#278e4c,#810f0a",
  27. theme_advanced_background_colors : "#ffffff,#ff9933,#8e4a27,#ce5124,#ce246d,#001467,#5e6700,#d9e74a,#4639ce,#353009,#278e4c,#810f0a",
  28. - theme_advanced_more_colors : false
  29. + theme_advanced_more_colors : false,
  30. + force_br_newlines : true
  31. });
  32. </script>
  33. </head>
  34. @@ -62,6 +63,10 @@
  35. <textarea style="width: 100%;" name="teaser_<?php echo $performance[$this->_get_instance()."_performance_id"]; ?>"><?php echo $performance["teaser"]; ?></textarea>
  36. <br />
  37. <input type="submit" value="Gem" />
  38. + <span style="width:">
  39. + <!--<input type="button" value="Flyt op" onclick="location.href = '<?php echo DIRECTORY; ?>Forestillinger/MoveUp/ID/<?php echo $performance[$this->_get_instance()."_performance_id"]; ?>';" />
  40. + <input type="button" value="Flyt ned" onclick="location.href = '<?php echo DIRECTORY; ?>Forestillinger/MoveDown/ID/<?php echo $performance[$this->_get_instance()."_performance_id"]; ?>';" />-->
  41. + </span>
  42. <?php
  43. }
  44. else
  45. diff --git a/frontpage.phtml b/frontpage.phtml
  46. index d21b786..2635331 100755
  47. --- a/frontpage.phtml
  48. +++ b/frontpage.phtml
  49. @@ -32,7 +32,36 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
  50. ?>
  51. <div id="front_content" style="width: 910px; height: 341px; background-image: url(<?php echo DIRECTORY; ?>Image/Show/Index/frontpage);padding-left: 40px;padding-top: 20px;background-color: black;">
  52. <div style="width: 50%;float: left;">
  53. - <p><b style="color: #<?php echo $this->frontpage["text_color_theme"]; ?>;font-size: 22px;"><?php echo $this->top_performance["title"].(strlen($this->top_performance["sub_title"]) > 0 ? " - ".$this->top_performance["sub_title"] : ""); ?></b></p>
  54. + <p><b style="color: #<?php echo $this->frontpage["text_color_theme"]; ?>;font-size: 22px;">
  55. + <?php
  56. + if($this->authentication->is_authenticated())
  57. + {
  58. + ?>
  59. + <form action="<?php echo DIRECTORY; ?>Forside/ChangeFirstPerformance" method="post">
  60. + <select name="performance">
  61. + <?php
  62. + foreach($this->performances as $performance)
  63. + {
  64. + if($performance[$this->_get_instance()."_performance_id"] == $this->top_performance[$this->_get_instance()."_performance_id"])
  65. + {
  66. + ?><option selected="selected" value="<?php echo $performance[$this->_get_instance()."_performance_id"]; ?>"><?php echo $performance["title"]; ?></option><?php
  67. + }
  68. + else
  69. + {
  70. + ?><option value="<?php echo $performance[$this->_get_instance()."_performance_id"]; ?>"><?php echo $performance["title"]; ?></option><?php
  71. + }
  72. + }
  73. + ?>
  74. + </select>
  75. + <input type="submit" value="Vælg forestilling">
  76. + </form>
  77. + <?php
  78. + }
  79. + else
  80. + {
  81. + echo $this->top_performance["title"].(strlen($this->top_performance["sub_title"]) > 0 ? " - ".$this->top_performance["sub_title"] : "");
  82. + }
  83. +?></b></p>
  84. <?php echo substr($this->top_performance["teaser"], 0, 800); ?>
  85. <?php if(strlen($this->top_performance["teaser"]) > 800) echo "..."; ?>
  86. <p>
  87. @@ -103,7 +132,37 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
  88. ?>
  89. <div id="front_content" style="width: 910px; height: 341px;padding-left: 40px;background-color: #<?php echo $this->frontpage["color_theme"]; ?>;">
  90. <div style="width: 530px;float: left;padding-top: 20px;">
  91. - <p><b style="color: #<?php echo $this->frontpage["text_color_theme"]; ?>;font-size: 22px;"><?php echo $this->top_performance["title"].(strlen($this->top_performance["sub_title"]) > 0 ? " - ".$this->top_performance["sub_title"] : ""); ?></b></p>
  92. + <p><b style="color: #<?php echo $this->frontpage["text_color_theme"]; ?>;font-size: 22px;">
  93. + <?php
  94. + if($this->authentication->is_authenticated())
  95. + {
  96. + ?>
  97. + <form action="<?php echo DIRECTORY; ?>Forside/ChangeFirstPerformance" method="post">
  98. + <select name="performance">
  99. + <?php
  100. + foreach($this->performances as $performance)
  101. + {
  102. + if($performance[$this->_get_instance()."_performance_id"] == $this->top_performance[$this->_get_instance()."_performance_id"])
  103. + {
  104. + ?><option selected="selected" value="<?php echo $performance[$this->_get_instance()."_performance_id"]; ?>"><?php echo $performance["title"]; ?></option><?php
  105. + }
  106. + else
  107. + {
  108. + ?><option value="<?php echo $performance[$this->_get_instance()."_performance_id"]; ?>"><?php echo $performance["title"]; ?></option><?php
  109. + }
  110. + }
  111. + ?>
  112. + </select>
  113. + <input type="submit" value="Vælg forestilling">
  114. + </form>
  115. + <?php
  116. + }
  117. + else
  118. + {
  119. + echo $this->top_performance["title"].(strlen($this->top_performance["sub_title"]) > 0 ? " - ".$this->top_performance["sub_title"] : "");
  120. + }
  121. + ?></b></p>
  122. +
  123. <?php echo substr($this->top_performance["teaser"], 0, 800); ?>
  124. <?php if(strlen($this->top_performance["teaser"]) > 800) echo "..."; ?>
  125. <p>
  126. @@ -203,8 +262,36 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
  127. ?>
  128. <div id="front_content" style="width: 910px; height: 341px;padding-left: 40px;background-color: #<?php echo $this->frontpage["color_theme"]; ?>;">
  129. <div style="width: 435px;float: left;padding-top: 20px;">
  130. - <p><b style="color: #<?php echo $this->frontpage["text_color_theme"]; ?>;font-size: 22px;"><?php echo $this->top_performance["title"].(strlen($this->top_performance["sub_title"]) > 0 ? " - ".$this->top_performance["sub_title"] : ""); ?></b></p>
  131. - <?php echo substr($this->top_performance["teaser"], 0, 400); ?>
  132. + <p><b style="color: #<?php echo $this->frontpage["text_color_theme"]; ?>;font-size: 22px;"><?php
  133. + if($this->authentication->is_authenticated())
  134. + {
  135. + ?>
  136. + <form action="<?php echo DIRECTORY; ?>Forside/ChangeFirstPerformance" method="post">
  137. + <select name="performance">
  138. + <?php
  139. + foreach($this->performances as $performance)
  140. + {
  141. + if($performance[$this->_get_instance()."_performance_id"] == $this->top_performance[$this->_get_instance()."_performance_id"])
  142. + {
  143. + ?><option selected="selected" value="<?php echo $performance[$this->_get_instance()."_performance_id"]; ?>"><?php echo $performance["title"]; ?></option><?php
  144. + }
  145. + else
  146. + {
  147. + ?><option value="<?php echo $performance[$this->_get_instance()."_performance_id"]; ?>"><?php echo $performance["title"]; ?></option><?php
  148. + }
  149. + }
  150. + ?>
  151. + </select>
  152. + <input type="submit" value="Vælg forestilling">
  153. + </form>
  154. + <?php
  155. + }
  156. + else
  157. + {
  158. + echo $this->top_performance["title"].(strlen($this->top_performance["sub_title"]) > 0 ? " - ".$this->top_performance["sub_title"] : "");
  159. + }
  160. + ?></b></p>
  161. + <?php echo substr($this->top_performance["teaser"], 0, 400); ?>
  162. <?php if(strlen($this->top_performance["teaser"]) > 400) echo "..."; ?>
  163. <p>
  164. <a href="<?php echo DIRECTORY; ?>Forestilling/Show/Name/<?php echo urlencode($this->top_performance["title"]); ?>"><b style="font-size: 15px;color: #<?php echo $this->frontpage["text_color_theme"]; ?>;">LÆS MERE HER</b></a>
  165. @@ -302,15 +389,45 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
  166. <div style="clear: left;"></div>
  167. </div>
  168. <div id="front_bottom" style="width: 950px; height: 222px; margin-top: 30px; padding-left: 2px;">
  169. - <?php
  170. - foreach($this->next_two_performances as $performance)
  171. + <?php
  172. + $i = 1;
  173. + foreach($this->next_two_performances as $performance)
  174. {
  175. + $i++;
  176. $_SESSION["image"]["performance_id_".$performance[$this->_get_instance()."_performance_id"]] = $performance["small_image"];
  177. ?>
  178. <div id="show2" style="line-height: 16px; width: 330px; float: left; margin-right: 30px; position: relative;">
  179. <img src="<?php echo DIRECTORY; ?>Image/Show/Index/<?php echo "performance_id_".$performance[$this->_get_instance()."_performance_id"]; ?>" style="float: left; margin-right: 15px;width: 120px;" />
  180. <span class="redbold12">
  181. - <?php echo $performance["title"]; ?>
  182. + <?php
  183. + if($this->authentication->is_authenticated())
  184. + {
  185. + ?>
  186. + <form action="<?php echo DIRECTORY; ?>Forside/ChangePerformance/Number/<?php echo $i; ?>" method="post">
  187. + <select name="performance">
  188. + <?php
  189. + foreach($this->performances as $sub_performance)
  190. + {
  191. + if($sub_performance[$this->_get_instance()."_performance_id"] == $performance[$this->_get_instance()."_performance_id"])
  192. + {
  193. + ?><option selected="selected" value="<?php echo $sub_performance[$this->_get_instance()."_performance_id"]; ?>"><?php echo $sub_performance["title"]; ?></option><?php
  194. + }
  195. + else
  196. + {
  197. + ?><option value="<?php echo $sub_performance[$this->_get_instance()."_performance_id"]; ?>"><?php echo $sub_performance["title"]; ?></option><?php
  198. + }
  199. + }
  200. + ?>
  201. + </select>
  202. + <input type="submit" value="Vælg forestilling">
  203. + </form>
  204. + <?php
  205. + }
  206. + else
  207. + {
  208. + echo $performance["title"];
  209. + }
  210. + ?>
  211. <br /><br />
  212. </span>
  213. <span class="black12" style="p { color: black; }">
  214. diff --git a/includes/styles.css b/includes/styles.css
  215. index b4f7cd2..db88fd7 100755
  216. --- a/includes/styles.css
  217. +++ b/includes/styles.css
  218. @@ -122,8 +122,13 @@
  219. }
  220.  
  221. .redbold14 {
  222. - font-family: verdana;
  223. - font-size: 14px;
  224. - font-weight: bold;
  225. - color: #810f0a;
  226. + font-family: verdana;
  227. + font-size: 14px;
  228. + font-weight: bold;
  229. + color: #810f0a;
  230. }
  231. +
  232. +p {
  233. + margin: 0px;
  234. + padding: 0px;
  235. +}
  236. \ No newline at end of file
  237. --
  238. 1.7.0.4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement