Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 link directory...can someone make this?
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #35
RE: link directory...can someone make this?
I'm really sorry for my late answer, Rocketfoot. I'm not in the fit condition in this week Biggrin

For the newthread link:
Create a new template in global template:
xtld_forumdisplay_newthread

HTML Code
<a href="newthread.php?fid={$fid}" target="_blank"><img src="{$theme['imglangdir']}/newthread.gif" alt="{$lang->post_thread}" title="{$lang->post_thread}" /></a>

You can change the newthread button image there, if you have a button for the newlink. Something like this:

HTML Code
<a href="newthread.php?fid={$fid}" target="_blank"><img src="{$theme['imglangdir']}/newlink.png" alt="Submit A New Link" title="Submit A new Link" /></a>


For the Back "button", I've updated it for additional link (edit post link) in threadlist, and I've updated the Redirect Time Delay:
Required at least XThreads v 1.32:

  1. Edit Redirect Delay custom thread fields:
    Blank Replacement Value: and Display Format: (to keep the "compatibility" for existing thread):

    Code:
    <if $mybb->user['usergroup'] == 4 then>21<else>2</if>

  2. Edit Back custom thread fields:
    Blank Replacement Value: and Display Format: (to keep the "compatibility" for existing thread):

    HTML Code
    1
    2
    3
    4
    5
    6
    <if THIS_SCRIPT == 'forumdisplay.php' && $mybb->user['usergroup'] == 4 then>
    	<span> - <strong><a href="{$mybb->settings['bburl']}/editpost.php?pid={$thread['firstpost']}">Edit</a></strong></span>
    </if>
    <if THIS_SCRIPT == 'showthread.php' && $mybb->user['usergroup'] == 4 then>
    	<div style="text-align: center;"><strong><a href="{$forumurl}">Back</a></strong></div>
    </if>

  3. Then, edit xtld_forumdisplay_thread template, add {$GLOBALS['threadfields']['xtldback']} to the template, something like this:

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    <tr>
    	<td align="center" class="{$bgcolor}" width="1">
    		<a href="{$thread['threadlink']}" target="_blank"><img src="http://www.iwebtool2.com/img/?r={$mybb->settings['bburl']}/&amp;domain={$GLOBALS['threadfields']['xtldwww']}" alt="{$thread['subject']}" title="{$thread['subject']}" style="width: 120px; height: 90px;" /></a>
    	</td>
    	<td class="{$bgcolor}">
    		<strong><a href="{$thread['threadlink']}" target="_blank" class="{$inline_edit_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a></strong>
    		({$thread['views']} {$lang->views}){$GLOBALS['threadfields']['xtldback']}
    		<div class="smalltext"><strong>Submitted By: {$thread['profilelink']}</strong> - <em>{$thread['threaddate']} at {$thread['threadtime']}</em></div>
    		<div class="smalltext">{$GLOBALS['threadfields']['xtlddesc']}</div>
    	</td>
    	{$modbit}
    </tr>

    This update will add edit post link for each thread in thread list (viewable for admin only). So, when we need to edit a thread, we don't need to view the postbit, just click the edit link Biggrin
    Links In Categories - Admin View:
       

    Links In Categories - User View:
       



For the redirecting to the Link Directory Index after submitting a new link, we need a plugin for that. I've attached the example plugin.
Open up the file, edit this line:

PHP Code:
array(21,22,23,24)

List your forum id for each link directory there. In that sample, there are 21,22,23 and 24. Then, upload it to your inc/plugins directory. Activate it.

Again, I'm really sorry for this late.



Attached File(s)
.php  xtlinkdirectory.php (Size: 914 bytes / Downloads: 562)

10-13-2010 06:24 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: link directory...can someone make this? - RateU - 10-13-2010 06:24 AM

 Standard Tools
Forum Jump: