swatit-jromero / wpng-calendar

Automatically exported from code.google.com/p/wpng-calendar
0 stars 0 forks source link

Allow Other Content on wpng-calendar pages #23

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I would like to have the ability to add other content on the pages where
I've added custom field to display the calendar. Right now if I add the
custom field It doesn't show any of the content that I've added to that page.

Original issue reported on code.google.com by imso...@gmail.com on 29 Mar 2008 at 4:21

GoogleCodeExporter commented 8 years ago
btw, I'm using WordPress 2.5 and wpng-calendar 0.8.5

Original comment by imso...@gmail.com on 29 Mar 2008 at 4:24

GoogleCodeExporter commented 8 years ago
I found a way to do this in wp 2.5 .  Under the plugin menu, next to the 
activate 
link for this plugin, click edit (or latrenately, just go to the calnder 
pluigin in 
the plugin editor.  within the editor, scroll down through a section called 
Content 
Page Functions.  Then under a section to //Display the claender in a Page, you 
can 
insert a <div></div> line with your own code.  You can put code either above 
the 
calander or below the calendar through some experimentation, but it must be put 
in 
this section and it must be put between <div></div> pair in a line or two.
Here's my example:
// Display the calendar in a Page
        function displayPageCalendar($weeks) {
            // Get the feed URL from the options
            $adminOptions = $this->getAdminOptions();
            // Set the default for number of weeks to query if none (or 
invalid)
            if (($weeks == null) or (!is_numeric($weeks))) {
                $weeks = 4;
            }
            ?>
<div>Below you will find our <a href="http://www.google.com/calendar/embed?
src=hwy61revised%40gmail.com&ctz=America/Chicago">Google calendar</a>, which 
you 
can subscribe to and add into your own calender.<a 
href="https://www.google.com/accounts/ServiceLogin?
service=cl&passive=true&nui=1&continue=http%3A%2F%2Fwww.google.com%
2Fcalendar%2Frender%3Fcid%3Dhttp%253A%252F%252Fwww.google.com%252Fcalendar%252Ff
eeds%
252Fhwy61revised%252540gmail.com%252Fprivate%252Fembed&followup=http%3A%2F%
2Fwww.google.com%2Fcalendar%2Frender%3Fcid%3Dhttp%253A%252F%252Fwww.google.com%
252Fcalendar%252Ffeeds%252Fhwy61revised%252540gmail.com%252Fprivate%252Fembed" 
target="_blank"><img 
src="http://www.google.com/calendar/images/calendar_plus_en.gif" alt="" 
width="111" 
height="16" /></a>

Have a suggestion for an event to include on the calendar, or a story we might 
want 
to further write about? Please send us a line at hwy61revised at gmail dot 
com.</div>
            <div id="wpng-cal-events" style="display:none;"></div>
            <div id="wpng-cal-load-page" class="wpng-cal-loading">
                <img class="wpng-cal-image" src='/wp-
content/plugins/wpng-calendar/images/loading_large.gif'/>
            </div>
            <div>
            <script type="text/javascript">
                weeks = <?php echo($weeks) ?>;
                addLoadEvent(loadCalendarByWeeks);
            </script>
            </div>
            <?php

Original comment by Hwy61Rev...@gmail.com on 5 Apr 2008 at 6:39

GoogleCodeExporter commented 8 years ago
That's cool, I'll have to try it out. It would be nice for the plugin it self 
to just
allow the content on a page to be displayed along with the calendar. That would 
make
it easier for the average joe to add content to a calendar page.

Original comment by imso...@gmail.com on 5 Apr 2008 at 7:46

GoogleCodeExporter commented 8 years ago
I got this to work on my site - but there is one annoying thing I cannot figure 
out.

I inserted a pretty large Google Calendar iframe on a Calendar page in my 
wordpress
install. I inserted my iframe into wpng-calendar.php. I did a little bit of 
other
stuff too (I added a title to the wpng-generated events). No big deal.

Here is the problem I'm having:

When clicking on a wpng-generated event link, the pop-up window appears only at 
the
top of the screen. This would be fine - except that I have a large Google 
Calendar up
there. Is there a way to make the wpng pop up window orient itself to fill the 
screen
where a link was clicked - and not just at the top of the screen?

You can see the (crappy) page I'm working on here:
http://flyingpigeon-la.com/calendar/

Original comment by flyingpi...@gmail.com on 25 Aug 2008 at 9:56