Uutiset:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu
Advertisement:

Extra pagina\'s kunnen maken

Aloittaja gjhvs, tammikuu 10, 2008, 01:43:17 IP

« edellinen - seuraava »

gjhvs

Hey mensen,

Ik werk met SMF 1.1.4 en ik zou het tof vinden om wat losse extra pagina's te kunnen maken. Ik heb een pagina met Forumregels en FAQ..
Ik gebruik het Default theme.
Ik zou dus eigenlijk willen dat ik staandaard het bovenste gedeelte te zien krijg (banner, persoonlijke info, menu balkje) en dat ik daaronder zelf teksten kan plaatsen.
Is daar een modje voor?

Aaron


Harro


gjhvs


jeroentju

Ja, ik heb hem zelf ook op 1.1.4 geprobeerd.

Herman's Mixen

tussen 1.1.3 en 1.1.4 is niet zo heel erg veel verschil dus daar zullen de meeste mods wel installeren op een 1.1.4 mits dit anders is aangegeven in de package-info file van de mod

  ;)
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

Guy Verschuere

Ik had gedacht dat deze mod automatisch knoppen zou bij maken in de menubalk, maar dit gebeurt niet. Is dit normaal?

Aaron

Je zult waarschijnlijk je eigen thema even aan moeten passen.

gjhvs

#8
Lainaus käyttäjältä: Aäron - tammikuu 10, 2008, 01:46:57 IP
In dit topic vind je wat je wilt bereiken: How to create a custom action. :)

Bedankt ik heb jou voorstel gebruikt en werkt goed!
Ik heb 2 pagina's aangemaakt: Forum regels en FAQ.

Ik heb ook in de menu 2 tabjes toegevoegd voor deze 2 > zie voorbeeld


Zoals je kunt zien blijft Forum-index ge-highlight in de menubalk en niet Forumregels.
Ik heb hiervoor index.template.php aangepast. Ik heb hiervoor het stukje homebutton gekopieerd en geplakt en aangepast. Dat ziet er zo uit:

Lainaa// Show the [home] button.
   echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '"><b>' , $txt[103] , '</B></a>
            </td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
            
   // Show the [forumregels] button.
   echo ($current_action=='forumregels' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'forumregels' ? 'active_back' : 'back' , '">
               <a href="index.php?action=forumregels"><font color="#f46519"><B>FORUMREGELS</B></font></a>
            </td>' , $current_action == 'forumregels' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

Wat doe ik fout? Ik wil dus als met op forumregels klikt ook dat tabje in het menu "aan" staat" ...

Herman's Mixen

verander de current_action variable naar search ;) variable die je gebruikt is niet gedefineerd !
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

gjhvs

#10
Lainaus käyttäjältä: The Burglar! - tammikuu 12, 2008, 07:47:22 AP
verander de current_action variable naar search ;) variable die je gebruikt is niet gedefineerd !

Als ik dit doe dan worden beide knoppen ge-highlight als ik op zoeken heb geklikt.....
Ook niet de bedoeling ;)

Heb je toevallig nog een andere oplossing ? :) Die variable definieren? En hoe doe je dat dan?

Herman's Mixen

#11

// Show the [forumregels] button.
   echo ($current_action=='search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'search' ? 'active_back' : 'back' , '">
               <a href="index.php?action=forumregels"><font color="#f46519"><B>FORUMREGELS</B></font></a>
            </td>' , $current_action == 'search' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


zou moeten werken

index.template.php zoek

// Work out where we currently are.
$current_action = 'home';
if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
$current_action = 'admin';
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action = 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first = 'last';
$last = 'first';
}
else
{
$first = 'first';
$last = 'last';
}


hier kan je de variablen defineren

if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];


en voeg je eigen variable hier aan toe
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

gjhvs

Hey Burglar,

Je laatste tip heeft geholpen! Heb mij eigen variable er aan toegevoegd en het werkt :)

Bedankt!

Advertisement: