Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From bb19f4fd792128a4573e35c0bcd6343d7d0a0fb5 Mon Sep 17 00:00:00 2001
- From: Anders Ladegaard Marchsteiner <alm@2ndeffect.dk>
- Date: Tue, 1 Jun 2010 10:28:25 +0200
- Subject: [PATCH] Enable selecting of frontpage performances. Initial start of manuel ordering of$
- ---
- .gitignore | 1 +
- forestillinger.phtml | 7 ++-
- frontpage.phtml | 131 +++++++++++++++++++++++++++++++++++++++++++++++---
- includes/styles.css | 13 ++++--
- 4 files changed, 140 insertions(+), 12 deletions(-)
- diff --git a/.gitignore b/.gitignore
- index b25c15b..74c36c8 100644
- --- a/.gitignore
- +++ b/.gitignore
- @@ -1 +1,2 @@
- *~
- +\#*\#
- diff --git a/forestillinger.phtml b/forestillinger.phtml
- index 94b456f..89e55eb 100755
- --- a/forestillinger.phtml
- +++ b/forestillinger.phtml
- @@ -26,7 +26,8 @@
- theme_advanced_resizing : false,
- theme_advanced_text_colors : "#ff9933,#8e4a27,#ce5124,#ce246d,#001467,#5e6700,#d9e74a,#4639ce,#353009,#278e4c,#810f0a",
- theme_advanced_background_colors : "#ffffff,#ff9933,#8e4a27,#ce5124,#ce246d,#001467,#5e6700,#d9e74a,#4639ce,#353009,#278e4c,#810f0a",
- - theme_advanced_more_colors : false
- + theme_advanced_more_colors : false,
- + force_br_newlines : true
- });
- </script>
- </head>
- @@ -62,6 +63,10 @@
- <textarea style="width: 100%;" name="teaser_<?php echo $performance[$this->_get_instance()."_performance_id"]; ?>"><?php echo $performance["teaser"]; ?></textarea>
- <br />
- <input type="submit" value="Gem" />
- + <span style="width:">
- + <!--<input type="button" value="Flyt op" onclick="location.href = '<?php echo DIRECTORY; ?>Forestillinger/MoveUp/ID/<?php echo $performance[$this->_get_instance()."_performance_id"]; ?>';" />
- + <input type="button" value="Flyt ned" onclick="location.href = '<?php echo DIRECTORY; ?>Forestillinger/MoveDown/ID/<?php echo $performance[$this->_get_instance()."_performance_id"]; ?>';" />-->
- + </span>
- <?php
- }
- else
- diff --git a/frontpage.phtml b/frontpage.phtml
- index d21b786..2635331 100755
- --- a/frontpage.phtml
- +++ b/frontpage.phtml
- @@ -32,7 +32,36 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
- ?>
- <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;">
- <div style="width: 50%;float: left;">
- - <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>
- + <p><b style="color: #<?php echo $this->frontpage["text_color_theme"]; ?>;font-size: 22px;">
- + <?php
- + if($this->authentication->is_authenticated())
- + {
- + ?>
- + <form action="<?php echo DIRECTORY; ?>Forside/ChangeFirstPerformance" method="post">
- + <select name="performance">
- + <?php
- + foreach($this->performances as $performance)
- + {
- + if($performance[$this->_get_instance()."_performance_id"] == $this->top_performance[$this->_get_instance()."_performance_id"])
- + {
- + ?><option selected="selected" value="<?php echo $performance[$this->_get_instance()."_performance_id"]; ?>"><?php echo $performance["title"]; ?></option><?php
- + }
- + else
- + {
- + ?><option value="<?php echo $performance[$this->_get_instance()."_performance_id"]; ?>"><?php echo $performance["title"]; ?></option><?php
- + }
- + }
- + ?>
- + </select>
- + <input type="submit" value="Vælg forestilling">
- + </form>
- + <?php
- + }
- + else
- + {
- + echo $this->top_performance["title"].(strlen($this->top_performance["sub_title"]) > 0 ? " - ".$this->top_performance["sub_title"] : "");
- + }
- +?></b></p>
- <?php echo substr($this->top_performance["teaser"], 0, 800); ?>
- <?php if(strlen($this->top_performance["teaser"]) > 800) echo "..."; ?>
- <p>
- @@ -103,7 +132,37 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
- ?>
- <div id="front_content" style="width: 910px; height: 341px;padding-left: 40px;background-color: #<?php echo $this->frontpage["color_theme"]; ?>;">
- <div style="width: 530px;float: left;padding-top: 20px;">
- - <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>
- + <p><b style="color: #<?php echo $this->frontpage["text_color_theme"]; ?>;font-size: 22px;">
- + <?php
- + if($this->authentication->is_authenticated())
- + {
- + ?>
- + <form action="<?php echo DIRECTORY; ?>Forside/ChangeFirstPerformance" method="post">
- + <select name="performance">
- + <?php
- + foreach($this->performances as $performance)
- + {
- + if($performance[$this->_get_instance()."_performance_id"] == $this->top_performance[$this->_get_instance()."_performance_id"])
- + {
- + ?><option selected="selected" value="<?php echo $performance[$this->_get_instance()."_performance_id"]; ?>"><?php echo $performance["title"]; ?></option><?php
- + }
- + else
- + {
- + ?><option value="<?php echo $performance[$this->_get_instance()."_performance_id"]; ?>"><?php echo $performance["title"]; ?></option><?php
- + }
- + }
- + ?>
- + </select>
- + <input type="submit" value="Vælg forestilling">
- + </form>
- + <?php
- + }
- + else
- + {
- + echo $this->top_performance["title"].(strlen($this->top_performance["sub_title"]) > 0 ? " - ".$this->top_performance["sub_title"] : "");
- + }
- + ?></b></p>
- +
- <?php echo substr($this->top_performance["teaser"], 0, 800); ?>
- <?php if(strlen($this->top_performance["teaser"]) > 800) echo "..."; ?>
- <p>
- @@ -203,8 +262,36 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
- ?>
- <div id="front_content" style="width: 910px; height: 341px;padding-left: 40px;background-color: #<?php echo $this->frontpage["color_theme"]; ?>;">
- <div style="width: 435px;float: left;padding-top: 20px;">
- - <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>
- - <?php echo substr($this->top_performance["teaser"], 0, 400); ?>
- + <p><b style="color: #<?php echo $this->frontpage["text_color_theme"]; ?>;font-size: 22px;"><?php
- + if($this->authentication->is_authenticated())
- + {
- + ?>
- + <form action="<?php echo DIRECTORY; ?>Forside/ChangeFirstPerformance" method="post">
- + <select name="performance">
- + <?php
- + foreach($this->performances as $performance)
- + {
- + if($performance[$this->_get_instance()."_performance_id"] == $this->top_performance[$this->_get_instance()."_performance_id"])
- + {
- + ?><option selected="selected" value="<?php echo $performance[$this->_get_instance()."_performance_id"]; ?>"><?php echo $performance["title"]; ?></option><?php
- + }
- + else
- + {
- + ?><option value="<?php echo $performance[$this->_get_instance()."_performance_id"]; ?>"><?php echo $performance["title"]; ?></option><?php
- + }
- + }
- + ?>
- + </select>
- + <input type="submit" value="Vælg forestilling">
- + </form>
- + <?php
- + }
- + else
- + {
- + echo $this->top_performance["title"].(strlen($this->top_performance["sub_title"]) > 0 ? " - ".$this->top_performance["sub_title"] : "");
- + }
- + ?></b></p>
- + <?php echo substr($this->top_performance["teaser"], 0, 400); ?>
- <?php if(strlen($this->top_performance["teaser"]) > 400) echo "..."; ?>
- <p>
- <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>
- @@ -302,15 +389,45 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
- <div style="clear: left;"></div>
- </div>
- <div id="front_bottom" style="width: 950px; height: 222px; margin-top: 30px; padding-left: 2px;">
- - <?php
- - foreach($this->next_two_performances as $performance)
- + <?php
- + $i = 1;
- + foreach($this->next_two_performances as $performance)
- {
- + $i++;
- $_SESSION["image"]["performance_id_".$performance[$this->_get_instance()."_performance_id"]] = $performance["small_image"];
- ?>
- <div id="show2" style="line-height: 16px; width: 330px; float: left; margin-right: 30px; position: relative;">
- <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;" />
- <span class="redbold12">
- - <?php echo $performance["title"]; ?>
- + <?php
- + if($this->authentication->is_authenticated())
- + {
- + ?>
- + <form action="<?php echo DIRECTORY; ?>Forside/ChangePerformance/Number/<?php echo $i; ?>" method="post">
- + <select name="performance">
- + <?php
- + foreach($this->performances as $sub_performance)
- + {
- + if($sub_performance[$this->_get_instance()."_performance_id"] == $performance[$this->_get_instance()."_performance_id"])
- + {
- + ?><option selected="selected" value="<?php echo $sub_performance[$this->_get_instance()."_performance_id"]; ?>"><?php echo $sub_performance["title"]; ?></option><?php
- + }
- + else
- + {
- + ?><option value="<?php echo $sub_performance[$this->_get_instance()."_performance_id"]; ?>"><?php echo $sub_performance["title"]; ?></option><?php
- + }
- + }
- + ?>
- + </select>
- + <input type="submit" value="Vælg forestilling">
- + </form>
- + <?php
- + }
- + else
- + {
- + echo $performance["title"];
- + }
- + ?>
- <br /><br />
- </span>
- <span class="black12" style="p { color: black; }">
- diff --git a/includes/styles.css b/includes/styles.css
- index b4f7cd2..db88fd7 100755
- --- a/includes/styles.css
- +++ b/includes/styles.css
- @@ -122,8 +122,13 @@
- }
- .redbold14 {
- - font-family: verdana;
- - font-size: 14px;
- - font-weight: bold;
- - color: #810f0a;
- + font-family: verdana;
- + font-size: 14px;
- + font-weight: bold;
- + color: #810f0a;
- }
- +
- +p {
- + margin: 0px;
- + padding: 0px;
- +}
- \ No newline at end of file
- --
- 1.7.0.4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement