111
3lr0n
Re: navigational dropdown list
  • 2006/8/13 20:53

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


jensclas.. help is always appreciated no matter if its misunderstood or not...

I try explain a little bit..

Dont want a dropdown menu.. XOOPS have this method on pagenav class, the fact its smartsection (i think all the modules that uses pagination) uses this piece of code to know how many pages does an article have

explode('[pagebreak]'$body);


In this case $body is the variable that contains the full text of a smartsection article. Explode searchs for the separator (pagebreak) in the $body data and returns a number.. this is the number of pages.

Ok.. what i want is to use pagebreak but naming each one with pagebreak name1 or pagebreak name=name1 and how to code this so i can pass the data to pagenav class renderSelect function and build the select with those names.

No matter if i have to write the code.. but dont know php enough to find a function that can search for the pagebreaks, look at the name of EACH ONE, and pass those names.

Thats all
Spanish Overclocking Community xoops based site : www.overclocking.es



112
3lr0n
Re: navigational dropdown list
  • 2006/8/13 20:36

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Ta for quick replay.. but 2 questions..

1. why multimenu can help me to guess my "problem"?
2.- Where i can find those how to docs? the page seems to be in french (think so.. :)) and its refered to furniture?..

ta in advance
Spanish Overclocking Community xoops based site : www.overclocking.es



113
3lr0n
Re: navigational dropdown list
  • 2006/8/13 20:15

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


i cant find any multimenu module there.. do u mean multilanguaje?
Spanish Overclocking Community xoops based site : www.overclocking.es



114
3lr0n
navigational dropdown list
  • 2006/8/13 19:21

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Hi, im using XOOPS 2.0.14 and smartsection 2.1 and i was wondering if i can use the navigational dropdown list feature of the pagenav XOOPS class but using names instead of numbers. Im think of use something like pagebreak=name1 or pagebreak name=name1. So i generate a dropdown menu with names.

try to explain.

The code of item.php of /modules/smartsection create an instance of the object pagenav like this
if ($itemObj->pagescount() > 0) {
    include_once 
XOOPS_ROOT_PATH.'/class/pagenav.php';
    if (
$item_page_id == -1) ($item_page_id 0);
    
$pagenav = new XoopsPageNav($itemObj->pagescount(), 1$item_page_id'page''itemid=' $itemObj->itemid());
    
$xoopsTpl->assign('pagenav'$pagenav->renderNav());
}


To show the navigational numbers of pagination uses the rendernav function

$xoopsTpl->assign('pagenav'$pagenav->renderNav());


I check the pagenav class under /class/pagenav and see this method inside the class

function renderSelect($showbutton false)
    {
        if ( 
$this->total $this->perpage ) {
            return;
        }
        
$total_pages ceil($this->total $this->perpage);
        
$ret '';
        if ( 
$total_pages ) {
               
$ret '<form name="pagenavform">';
            
$ret .= '<select name="pagenavselect" onchange="location=this.options[this.options.selectedIndex].value;">';
            
$counter 1;
            
$current_page intval(floor(($this->current $this->perpage) / $this->perpage));
            while ( 
$counter <= $total_pages ) {
                if ( 
$counter == $current_page ) {
                    
$ret .= '<option value="'.$this->url.(($counter 1) * $this->perpage).'" selected="selected">'.$counter.'</option>';
                } else {
                    
$ret .= '<option value="'.$this->url.(($counter 1) * $this->perpage).'">'.$counter.'</option>';
                }
                
$counter++;
            }
            
$ret .= '</select>';
            if (
$showbutton) {
                
$ret .= '&nbsp;<input type="submit" value="'._GO.'" />';
            }
            
$ret .= '</form>';
        }
        return 
$ret;
    }


So to use the dropdown only have to chage this line on item.php

$xoopsTpl->assign('pagenav'$pagenav->[b]renderSelect()[/b]);


to use this function of the pagenav class.

But i want to generate a select box with names!

This code generates a dropdown with numbers..
But i want to generate a select box with names!
(example: 1.- Introduction, 2.- First Impression.. etc)

but dont know how the xoopscode "pagebrek" works so i dont know how to try to write some code to capture those pagebreaks names and generate the dropdown.

Ta in advance
Spanish Overclocking Community xoops based site : www.overclocking.es



115
3lr0n
Re: News site
  • 2006/8/13 15:52

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


I dont know what is exactly ur idea of a news/articles/oppinions site but i run one with those categories.

Imo a site layout is as clean as the designer wants to lol

check my site athttp://www.overclocking.es

PS: Is in spanish
Spanish Overclocking Community xoops based site : www.overclocking.es



116
3lr0n
overclocking.es: new spanish speech oc site
  • 2006/8/13 14:03

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Hi here is my new site:http://www.overclocking.es

is a site focus on the world of overclock for spanish speech users.

Fell free to take a look and reply with this topic with your oppinions, all, pros ands conts will be appreciated.

Regards
Spanish Overclocking Community xoops based site : www.overclocking.es



117
3lr0n
smartsection question
  • 2006/8/9 20:36

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Hi, im using smartsection and dont know if i can assign a name to each pagebreak o pagewrap so users can select by name (ie select box) and not by the number of the page.

Ta in advance
Spanish Overclocking Community xoops based site : www.overclocking.es



118
3lr0n
Re: module for database management
  • 2006/8/9 16:59

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Yeah, but i need the interface for my admins to manage only certain tables..
Spanish Overclocking Community xoops based site : www.overclocking.es



119
3lr0n
module for database management
  • 2006/8/9 13:29

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Hi.. i need a module that can make the management work on certain tables.

I mean, im going to create some tables on the db and want a module to use as the interface to manage those tables (insert, erase, etc...) like dadabik php script for example..

know any module that fit this?

ta in advance
Spanish Overclocking Community xoops based site : www.overclocking.es



120
3lr0n
Article module
  • 2006/8/8 19:00

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Hi, can u recommend me a good module to write tutorials and reviews?..

i used 2.0.14 and want if possible pagination with select box (ability to paginate and add a title to each page) and spotlight block that supports images for each article.

I have smartsection installed but i think have a problem with XOOPS 2.0.14 (i have problems indeed with it and have recently upgrade).

ta in advance
Spanish Overclocking Community xoops based site : www.overclocking.es




TopTop
« 1 ... 9 10 11 (12) 13 14 15 »



Login

Who's Online

216 user(s) are online (151 user(s) are browsing Support Forums)


Members: 0


Guests: 216


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits