The following warnings occurred:
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 745 errorHandler->error_callback
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 46 - File: showthread.php(1650) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1650) : eval()'d code 46 errorHandler->error_callback
/showthread.php 1650 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Church site using GS
#2
Hi man,
i'am wondering how did you done "events and announcements" page.
I'am trying to do same thing. I try to change multilevel menu, but i stuck.

i've add
Code:
$pagesArray[$count]['content'] = $data->content;
and
Code:
$xml.="<content><![CDATA[".$page['content']."]]></content>";

note: I'am not good with PHP

I have few problems:
1. I'am not getting data from all pages (i'am getting content and pubDate only from one page and from others only title)
2. How can I get only few first characters from content.

Code:
function page_article($a='') {
        if (!isset($a) || $a == '' || empty($a)) { $a = return_page_slug(); }
        $data = simplexml_load_string(ye_olde_data());
        $menu = $data->xpath('//*[parent="first-article"]');  /* Show only pages with this parent */
        function article_sorting($a, $b) {
            $c1=strcmp($a->menuOrder, $b->menuOrder);
            if ($c1!=0) return $c1;
            $c2=strcmp(strtolower(($a->menu!=""?$a->menu:$a->pubDate)), strtolower(($b->menu!=""?$b->menu:$b->pubDate)));
            if ($c2!=0) return $c2;
            $c3=strcmp($a->slug, $b->slug);
            if ($c3!=0) return $c3;
        }
        usort($menu,"article_sorting");
        if (count($menu) > 0) {
            echo '<ul class="menu">';
            foreach ($menu as $link) {
                $prnt = count($data->xpath('//item[slug="'.$a.'"][parent="'.$link->slug.'"]'));
                echo '<li'.("$link->slug"==$a?' class="active"':($prnt>0?' class="parent"':'')).'><a href="'.$link->url.'">'.($link->menu!=""?$link->menu:$link->title).'</a>';
                echo '<br />';
                echo ''.($link->menu!=""?$link->menu:$link->pubDate).'';
                echo '<br /> <br />';
                echo ''.($link->menu!=""?$link->menu:$link->content).'';                
                echo '</li>';
                echo '<br /> <br />';
            }
            echo '</ul>';
        }
    }

Could you please help me?
Reply


Messages In This Thread
Church site using GS - by cameron - 2010-07-01, 00:02:50
Church site using GS - by zajca - 2010-07-02, 06:10:32
Church site using GS - by cameron - 2010-07-02, 11:50:13



Users browsing this thread: 1 Guest(s)