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?
In dit topic vind je wat je wilt bereiken: How to create a custom action (http://www.simplemachines.org/community/index.php?topic=23864.0). :)
Er is ook de custom action mod: http://custom.simplemachines.org/mods/index.php?mod=331
Lainaus käyttäjältä: Harro - tammikuu 10, 2008, 01:49:29 IP
Er is ook de custom action mod: http://custom.simplemachines.org/mods/index.php?mod=331
Draait die ook met 1.1.4? Er staat namelijk alleen 1.1.3 bij..
Ja, ik heb hem zelf ook op 1.1.4 geprobeerd.
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
;)
Ik had gedacht dat deze mod automatisch knoppen zou bij maken in de menubalk, maar dit gebeurt niet. Is dit normaal?
Je zult waarschijnlijk je eigen thema even aan moeten passen.
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 (http://www.simplemachines.org/community/index.php?topic=23864.0). :)
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
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi61.photobucket.com%2Falbums%2Fh59%2Fgjhvs%2Fdefaultforum%2Fdefaulforum_menuproblem2.jpg&hash=1c6cfe3a11e10862ded0e9ec0ddbfd389fb47673)
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 . '"> </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 . '"> </td>' : '';
// Show the [forumregels] button.
echo ($current_action=='forumregels' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </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 . '"> </td>' : '';
Wat doe ik fout? Ik wil dus als met op forumregels klikt ook dat tabje in het menu "aan" staat" ...
verander de current_action variable naar search ;) variable die je gebruikt is niet gedefineerd !
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?
// Show the [forumregels] button.
echo ($current_action=='search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </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 . '"> </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
Hey Burglar,
Je laatste tip heeft geholpen! Heb mij eigen variable er aan toegevoegd en het werkt :)
Bedankt!