WordPress.org

Ready to get started?Download WordPress

Forums

Weekly Class Schedule
How to show endhours in the main view (7 posts)

  1. sketch200
    Member
    Posted 1 year ago #

    Hi there
    I love the Plugin but I have a problem and I don't find a solution to fix it.
    I want to display the endhour in the mainview and not only the starthour.
    Thanks in advance for your help.
    Lars

    http://wordpress.org/extend/plugins/weekly-class-schedule/

  2. MDeb
    Member
    Posted 1 year ago #

    I too am facing the same dilemma. If you do find a way please post. It will be of immense help. I too am, in the meanwhile trying to play with the code.

    Till now I have ended up here.

    [code] <table class="wcs-schedule">
    <tr>
    <th></th>
    <?php foreach ( $weekday_names as $weekday ): ?>
    <th><?php echo $weekday; ?></th>
    <?php endforeach; ?>
    </tr>
    <?php foreach ( $start_hours as $start_hour ): ?>
    <?php foreach ( $end_hours as $end_hour ): ?>

    <tr>
    <th class="wcs-hour-title"><?php echo $start_hour; ?> - <?php echo $end_hour; ?></th>
    <?php foreach ( $weekdays as $weekday ): ?>
    <?php echo WcsSchedule::model()->renderClassTd( $classes, $start_hour, $weekday ) ?>
    <?php endforeach; ?>

    </tr>
    <?php endforeach; ?>
    <?php endforeach; ?>
    </table>
    [/code]

    Thanks in advance.
    Debashis

  3. MDeb
    Member
    Posted 1 year ago #

    I too am facing the same dilemma. If you do find a way please post. It will be of immense help. I too am, in the meanwhile trying to play with the code.

    Till now I have ended up here.

    <table class="wcs-schedule">
    	<tr>
    		<th></th>
    		<?php foreach ( $weekday_names as $weekday ): ?>
    		<th><?php echo $weekday; ?></th>
    		<?php endforeach; ?>
    	</tr>
    	<?php foreach ( $start_hours as $start_hour ): ?>
            <?php foreach ( $end_hours as $end_hour ): ?>
    
    		<tr>
    			<th class="wcs-hour-title"><?php echo $start_hour; ?> - <?php echo $end_hour; ?></th>
    			<?php foreach ( $weekdays as $weekday ): ?>
    			<?php echo WcsSchedule::model()->renderClassTd( $classes, $start_hour, $weekday ) ?>
      			<?php endforeach; ?>
    
    		</tr>
    	<?php endforeach; ?>
            <?php endforeach; ?>
    </table>

    Thanks in advance.
    Debashis

  4. sketch200
    Member
    Posted 1 year ago #

    the problem is i think you don't have the value for $end_hours in the the view. i think you have to pass the value from the controller or from the module to the view. i tried also different things but was not able to fix it with my php knowledge.
    would be awesome if somebody could help .

  5. MDeb
    Member
    Posted 1 year ago #

    I have tried reformatting the database with added rows for $end_hours, but with failure. Even I checked with the entire database structure but the values are not being called, even though the id that's being used is storing the data fed. I am in a fix now as how to proceed.

    Please guys we need a little help out here!

  6. sketch200
    Member
    Posted 1 year ago #

    @deb65 did you already find a solution. still trying but didn't found a way till now?

  7. MDeb
    Member
    Posted 1 year ago #

    @sketch200 I have really lost it. Tried even contacting the plugin support but no use.

    I tried editing the database too by adding some custom fields and calling them in the script but it seems the fields are being truncated somewhere. Its getting frustrating.

    Please if you do get a solution post it here.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic