Hallo, Gast! (Registrieren)

Letzte Ankündigung: MyBB 1.8.38 veröffentlicht (30.04.24)


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste
Hide links/url for Usergroups - 1.8.x
#11
Du könntest z.B. mal folgendes testen:
PHP-Code:
<if ($mybb->user['usergroup'] == 1) && ($forum['fid'] == xthen>
<
div><strong>Route planen ist für Gäste nicht möglich</strong></div>
<else>
<
div><strong>Route planen</strong></div><a href="{$GLOBALS['threadfields']['resrev_url']}target="_blank">{$GLOBALS['threadfields']['resrev_route']}</a>
</if> 

Um php-Code in Templates nutzen zu können, muss allerdings dieses PlugIn installiert sein.
"x" durch Deine fid ersetzen. Ich bin mir nicht ganz sicher, ob
$forum['fid'] an dieser Stelle verfügbar ist oder ob es evtl. $thread[fid] heißen muss.

Mit dieser Vorgehensweise trete ich jetzt bestimmt wieder eine Lavine los....
Es ist aber trotzdem ein schönes Gimmick.  Wink  Big Grin
Zitieren
#12
Bekomme dann leier nen syntax error

Code:
Parse error: syntax error, unexpected ',' in /homepages/8/d707489081/htdocs/forumdisplay.php(1340) : eval()'d code on line 88



Edit:
Fehler lag bei mir da ich die fid mit ,  getrennt.

Verwenden muss man dann $thread['fid'] wie kann ich den mehrere fid eintragen oder muss ich dann für jede thread['fid']  den Code einfügen
Zitieren
#13
Wo hast Du meinen Code eingefügt?
Er gehört ins Template.
Zitieren
#14
Habe es im Template eingefügt und funktioniert auch nur wie mache ich das mit mehreren Foren IDs ?

Wenn ich 
PHP-Code:
<if ($mybb->user['usergroup'] == 1) && ($thread['fid'] == 121122123then>
<
div>Route PlanenDann bitte <class="login" href="https://angel-juenger.de/member.php?action=login" rel="nofollow">Anmelden</a>  oder <class="register" href="https://angel-juenger.de/member.php?action=register" rel="nofollow">Registrieren</a></span></div>
<else>
<
a href="{$GLOBALS['threadfields']['resrev_url']}target="_blank">{$GLOBALS['threadfields']['resrev_route']}</a>
</if> 
 verwende kommt der error.

Muss ich dann für jede ID den Code neu einfügen oder wie trenne ich die fid´s
Zitieren
#15
Es sollte eigentlich so gehen:
PHP-Code:
<if ($mybb->user['usergroup'] == && in_array($thread['fid'], array(121,122,123))) then
Zitieren
#16
Wie doylecc schreibt, muss es eigentlich funktionieren.
Ich war davon ausgegangen, dass es nur eine fid betrifft. Wink
Zitieren
#17
Funktioniert leider nicht mit 
PHP-Code:
<if ($mybb->user['usergroup'] == 1) && (in_array($thread['fid'], array(121,122,123)) then
<
div>Route PlanenDann bitte <class="login" href="https://angel-juenger.de/member.php?action=login" rel="nofollow">Anmelden</a>  oder <class="register" href="https://angel-juenger.de/member.php?action=register" rel="nofollow">Registrieren</a></span></div>
<else>
<
a href="{$GLOBALS['threadfields']['resrev_url']}target="_blank">{$GLOBALS['threadfields']['resrev_route']}</a>
</if> 

da kommt leider auch ein syntax error

Code:
Parse error: syntax error, unexpected ';' in /homepages/8/d707489081/htdocs/forumdisplay.php(1340) : eval()'d code on line 126


Sorry an itsmeJAY für den ausschweifenden off topic Spam im Plugin support thread, vielleicht kann das ja mal einer in ein separaten Thread verschieben.
Zitieren
#18
Poste mal deinen gesamten Code, welchen du jetzt bearbeitet hast.

Grüße
Zitieren
#19
Das postebit sieht so aus

PHP-Code:
{$ignore_bit}
<
a name="pid{$post['pid']}id="pid{$post['pid']}"></a>
<
div class="post{$post['styleclass']} {$unapproved_shade}style="{$post_visibility}id="post_{$post['pid']}">
<
div class="post_author">
    {
$post['useravatar']}
    <
div class="author_information">
            <
strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
            <
span class="smalltext">
                {
$post['usertitle']}<br />
                {
$post['userstars']}
                {
$post['groupimage']}
            </
span>
    </
div>
    <
div class="author_statistics">
        {
$post['user_details']}{$post['pin_available']}{$post['newpoints_postbit']}
    </
div>
</
div>
<
div class="post_content" id="resize_{$post['pid']}">
    <
div class="post_head">
        {
$post['posturl']}
        {
$post['icon']}
        <
span class="post_date">{$post['postdate']} <span class="post_edit" id="edited_by_{$post['pid']}">{$post['editedmsg']}</span></span>
        {
$post['subject_extra']}
    </
div>
                    </
tr>
                </
table>
            </
td>
        </
tr>
        <
tr>
            <
td class="trow2 post_content {$unapproved_shade}">
                <
div class="float_right">{$GLOBALS['tplvars']['resrev_map']}</div>
                <
div class="float_left"><span style="font-size:10px">Auf Bild klicken zum Zoomen</span><br>{$GLOBALS['threadfields'] ['resrev_photo']['value']}</div>
                <
table border="0">
                    <
tr>
                        <
p>
</
p>
                    
            <
br><h5><strong>Adresse/Bewertung:</strong></h5> <div class="largetext">{$post['subject']}</div></td>
                    </
tr>
                    <
tr>
                        <
td colspan="2"><em>{$GLOBALS['threadfields']['resrev_location']}</em></td>
                    </
tr>
<
td valign="top">Route planen</td>
<
td valign="top"><if ($mybb->user['usergroup'] == 1) && ($thread['fid'] == 121then>
<
div>Route PlanenDann bitte <class="login" href="https://angel-juenger.de/member.php?action=login" rel="nofollow">Anmelden</a>  oder <class="register" href="https://angel-juenger.de/member.php?action=register" rel="nofollow">Registrieren</a></span></div>
<else>
<
a href="{$GLOBALS['threadfields']['resrev_url']}target="_blank">{$GLOBALS['threadfields']['resrev_route']}</a>
</if> </
td>
</
tr>
                            <
tr>
                    {
$GLOBALS['threadfields']['resrev_food']}
                    {
$GLOBALS['threadfields']['resrev_service']}
                    {
$GLOBALS['threadfields']['resrev_atm']}
                    {
$GLOBALS['threadfields']['resrev_qua']}
                    {
$GLOBALS['threadfields']['resrev_value']}



<
td valign="top">Gastkarten verfügbar</td>
<
td valign="top"><img src="{$theme['imgdir']}/{$GLOBALS['threadfields']['resrev_gast']}.png" title="{$GLOBALS['threadfields']['resrev_gast']}"/></td>
                            </
tr>
                            <
tr>
                                <
td valign="top">Verkaufsstelle für Gastkarten</td>
<
td valign="top">
<if (
$mybb->user['usergroup'] == 1) && ($thread['fid'] == 121then>
<
div>Verkaufsstelle anzeigenDann bitte <class="login" href="https://angel-juenger.de/member.php?action=login" rel="nofollow">Anmelden</a>  oder <class="register" href="https://angel-juenger.de/member.php?action=register" rel="nofollow">Registrieren</a></span></div>
<else>
<
a href="{$GLOBALS['threadfields']['resrev_kartenurl']}target="_blank">{$GLOBALS['threadfields']['resrev_kartenver']}</a>
</if> </
td>
    </
tr>
    <
tr>
    <
td valign="top"></td>
<
td valign="top">
<
br>        
<if (
$mybb->user['usergroup'] == 1) && ($thread['fid'] == 121then>
<
div></span></div>
<else>
<
a href="{$GLOBALS['threadfields']['resrev_kartenurl']}target="_blank">{$GLOBALS['threadfields']['resrev_kartenver1']}</a>
</if>     </
td>
    </
tr>
    <
tr>    
                                
                </
table>
                <
br class="clear" />
                <
div class="post_body scaleimages" id="pid_{$post['pid']}">
        {
$post['message']}
    </
div>
    {
$post['attachments']}
    {
$post['signature']}
    <
div class="post_meta" id="post_meta_{$post['pid']}">
        {
$post['quick_quote']}{$post['iplogged']}
    </
div>
</
div>
<
div style="{$post['tyl_display']}id="tyl_{$post['pid']}">{$post['thankyoulike_data']}</div>    
<
div class="post_controls tfoot">
    <
div class="postbit_buttons postbit_buttons-mobile author_buttons postbit_footer" style="text-align: left;">
        {
$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}
    <
div class="postbit_buttons postbit_buttons-mobile post_management_buttons float_right">
        {
$post['button_tyl']}{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quickrestore']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_purgespammer']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
    </
div>
    </div>
<
div id="edit_post_{$post['pid']}_popup" class="popup_menu1" style="display: none;"><div class="popup_item_container"><a href="javascript:;" class="popup_item quick_edit_button" id="quick_edit_post_{$post['pid']}">{$lang->postbit_quick_edit}</a></div><div class="popup_item_container"><a href="editpost.php?pid={$post['pid']}class="popup_item">{$lang->postbit_full_edit}</a></div></div>   
<script type="text/javascript">
// <!--
    
if(use_xmlhttprequest == "1")
    {
        $(
"#edit_post_{$post['pid']}").popupMenu();
    }
// -->
    
</script>
</
div
            </
td>
        </
tr>
    </
tbody>
</
table


und das forumdisplay_thread

PHP-Code:
<table border="0" cellspacing="{$theme['borderwidth']}cellpadding="{$theme['tablespace']}width="100%">
    <
tr>
        <
td>
            <
table border="0" cellspacing="{$theme['borderwidth']}cellpadding="{$theme['tablespace']}class="tborder" style="clear: both;">
                <
tr>
                    <
td class="thead4" align="center" colspan="{$colspan}">
                        <
div><strong><a href="{$thread['threadlink']}class="{$inline_edit_class} {$new_class}id="tid_{$inline_edit_tid}">{$thread['subject']}</a></strong></div>
                    </
td>
                </
tr>
                <
tr>
                    <
td class="{$bgcolor}width="1">
                        <
div align="center">
                        <
strong>Gewässerbild</strong><br>{$GLOBALS['threadfields']['resrev_photo']['value']}
                        </
div>
                    </
td>
                    <
td class="{$bgcolor}width="100%">
                        <
table border="0" width="100%">
                            <
tr>
                                <
td valign="top" width="120"></td>
                                <
td width="1" valign="top"></td>
                                <
td valign="top">{$GLOBALS['threadfields']['resrev_food']}</td>
                            </
tr>
                                                                                    <
tr>
                                <
td valign="top"></td>
                                <
td width="1" valign="top"></td>
                                <
td valign="top">{$GLOBALS['threadfields']['resrev_service']}</td>
                            </
tr>
                            <
tr>
                                <
td valign="top"></td>
                                <
td width="1" valign="top"></td>
                                <
td valign="top">{$GLOBALS['threadfields']['resrev_atm']}<a></td>
                            </
tr>
                            <
tr>
                                <
td valign="top"></td>
                                <
td width="1" valign="top"></td>
                                <
td valign="top">{$GLOBALS['threadfields']['resrev_qua']}</td>
                            </
tr>
                                                        <
tr>
                                <
td valign="top"> </td>
                                <
td width="1" valign="top"></td>
                                <
td valign="top">{$GLOBALS['threadfields']['resrev_value']}</td>
                            </
tr>
                            <
tr>
                        
                                <
td valign="top">Gastkarten verfügbar</td>
                                
                                <
td valign="top"><img src="{$theme['imgdir']}/{$GLOBALS['threadfields']['resrev_gast']}.png" title="{$GLOBALS['threadfields']['resrev_gast']}"/></td>
                            </
tr>
                            <
tr>
                                        
                                <
td valign="top">{$lang->author}</td>
                                
                                <
td valign="top">{$thread['profilelink']}</td>
                            </
tr>
                            <
tr>
                                    {
$rating}
                            </
tr>
                            <
tr>
                                <
td valign="top">{$lang->views}</td>
                                
                                <
td valign="top">{$thread['views']}</td>
                            </
tr>
                            <
tr>
                                <
td valign="top">{$lang->replies}</td>
                            
                                <
td valign="top"><a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}</td>
                            </
tr>
</
tr>
                        </
table>
                    </
td>
                    {
$modbit}
                </
tr>
            </
table>
        </
td>
        <
td>&nbsp;</td>
        <
td valign="top" width="30%">
            <
table border="0" cellspacing="{$theme['borderwidth']}cellpadding="{$theme['tablespace']}class="tborder" style="clear: both;">
                <
tr>
                    <
td class="thead4" align="center" colspan="{$colspan}">
                        <
div><strong>Adresse/Route/Gastkarte</strong></div>
                    </
td>
                </
tr>
                <
tr>
                    <
td valign="top" class="{$bgcolor}width="300">
                        <
div style="text-align: left; padding: 3px;">
                            <
span class="float_left" style="margin: 5px 5px 0px 0px;">
                            {
$thread['subject']}<br>{$GLOBALS['threadfields']['resrev_location']}<br><div><strong>Route planen</strong></div><if ($mybb->user['usergroup'] == 1) && ($thread['fid'] == 121then>
<
div>Route Planen Dann bitte <class="login" href="https://angel-juenger.de/member.php?action=login" rel="nofollow">Anmelden</a>  oder <class="register" href="https://angel-juenger.de/member.php?action=register" rel="nofollow">Registrieren</a></span></div>
<else>
<
a href="{$GLOBALS['threadfields']['resrev_url']}target="_blank">{$GLOBALS['threadfields']['resrev_route']}</a>
</if> 
                            </
span>
<
div><strong>Verkaufsstelle für Gastkarten</strong></div>

<if (
$mybb->user['usergroup'] == 1) && ($thread['fid'] == 121then>
<
div>Verkaufsstelle anzeigenDann bitte <class="login" href="https://angel-juenger.de/member.php?action=login" rel="nofollow">Anmelden</a>  oder <class="register" href="https://angel-juenger.de/member.php?action=register" rel="nofollow">Registrieren</a></span></div>
<else>
<
a href="{$GLOBALS['threadfields']['resrev_kartenurl']}target="_blank">{$GLOBALS['threadfields']['resrev_kartenver']}</a>
</if>     
<
br>
                            
        <if (
$mybb->user['usergroup'] == 1) && ($thread['fid'] == 121then>
<
div></span></div>
<else>
<
a href="{$GLOBALS['threadfields']['resrev_kartenurl']}target="_blank">{$GLOBALS['threadfields']['resrev_kartenver1']}</a>
</if>                     
    </
div>
                        <
br class="clear" />
                        <
span class="float_right smalltext">
                            <
em><a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>:
                            {
$lastposterlink}, {$lastpostdate} {$lastposttime}</em>
                        </
span>
                        <
br class="clear" />
                        <
span class="float_right smalltext">
                            <
img src="{$theme['imgdir']}/{$folder}.gif" alt="{$folder_label}title="{$folder_label}/>
                            {
$icon}{$prefix}{$gotounread}
                        </
span>
                    </
td>
                </
tr>
            </
table>
        </
td>
    </
tr>
</
table
Zitieren
#20
Lenox,
was funktioniert jetzt genau nicht?
Auf Deiner oben verlinkten Seite wird`s  doch nun korrekt dargestellt...
Zitieren


Möglicherweise verwandte Themen…
Thema Verfasser Antworten Ansichten Letzter Beitrag
  Additional Usergroups on Profiles MyBB.de Bot 1 981 09.03.2021, 07:05
Letzter Beitrag: MyBB.de Bot
  Don't allow administrators to change usergroups MyBB.de Bot 0 905 18.07.2020, 21:40
Letzter Beitrag: MyBB.de Bot
  Hide links! MyBB.de Bot 3 1.912 13.08.2014, 11:56
Letzter Beitrag: Arni2win
  Additional Usergroups on profiles MyBB.de Bot 2 1.747 07.03.2012, 13:15
Letzter Beitrag: MyBB.de Bot
  Hide Links to Guests for 1.4 MyBB.de Bot 14 7.878 30.09.2011, 22:59
Letzter Beitrag: Jockl