vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Admins creates threads which are actually links (https://vborg.vbsupport.ru/showthread.php?t=36891)

Admin 04-01-2002 10:00 PM

Admins creates threads which are actually links
 
Ok this is a really neat idea requested by e_dove here:
https://vborg.vbsupport.ru/showthrea...threadid=36862

New version![/b]
Now includes links to Delete Thread as well as Stick/Unstick Thread.
If you already installed the hack, open forumdisplay.php and replace this:
Code:

    if (empty($thread['link'])) {
        $thread['link'] = "showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]";
    }

with this:
Code:

        $thread['deletelink'] = '';
        if (empty($thread['link'])) {
                $thread['link'] = "showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]";
        } else {
                $thread['link'] = $thread['link'];
                if ($bbuserinfo['usergroupid'] == 6) {
                        $thread['deletelink'] = "(<a href=\"postings.php?s=$session[sessionhash]&action=deletethread&threadid=$thread[threadid]\">delete</a> | <a href=\"postings.php?s=$session[sessionhash]&action=stick&threadid=$thread[threadid]\">stick / unstick</a>)";
                }
        }

And in your forumdisplaybit template add $thread[deletelink] after $thread[pagenav].

It gives admins the option to create threads, in any forum, which are actually links to someplace else.
Really basic, when admins create a new thread they have a box to enter URL. If the box isn't empty, whenever the thread is accessed the user will be redirected to that URL.

Using vbHacker as always, edits newthread.php, showthread.php and forumdisplay.php. Adds a field to thread table, creates a new template and edits 2 existing templates.

Have fun. :)

E 04-02-2002 10:18 AM

Thank you.. and people it doies work.. he tested it on my thread,, ill install tommorow

Admin 04-02-2002 10:21 AM

Here's an example of this hack:
https://vborg.vbsupport.ru/forumdisp...?s=&forumid=13
Click the thread "vBulletin 2.2.5 released".

Mutt 04-02-2002 10:28 AM

I did this same thing a while ago but never wrote up any directions.

I used the edit thread option of postings.php so you'd have to start a thread then go into postings and edit it to enter the redirect url. It was very simple to add to postings. I used a redirect page to send you to the new url. the views hit counter still works. I made a simple cp script which lists all threads with redirects with edit links. that admins script can also be used to list all stickies, all threads with polls, and all news threads (another hack).

I'd be happy to write it up if you wanted it. I feel the need to contribute since I started using vbhacker. damn handy tool.

snyx 04-02-2002 02:24 PM

I LOVE IT! Just what I wanted... and vbhacker! *drool*
thanks firefly! anyway you could make my "attachments on calendar events" hack? :D

cheer mate!
-Myles

LouChipher 04-02-2002 08:02 PM

let's count views?!

E 04-02-2002 08:43 PM

175...... i installed.. works great :)

nafae 04-02-2002 11:20 PM

Works fantastic!

er, how do I delete a thread that is a link? :nervous:

E 04-03-2002 01:49 AM

lol... i was wondering the same....lol... i saw u edited the first thread u tested it on and took the link off it again... may i ask how?

TheCaver 04-03-2002 03:32 AM

Great hack. Firefly, is it possible to target a new window? If not, it's still a cool hack :)

JC

Admin 04-03-2002 05:15 AM

nafae: lol I dunno. :p

TheCaver: sure. In forumdisplay.php replace:
Code:

    if (empty($thread['link'])) {
        $thread['link'] = "showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]";
    }

with:
Code:

    if (empty($thread['link'])) {
        $thread['link'] = "showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]";
    } else {
        $thread['link'] .= '" target="_blank';
    }


Parker Clack 04-03-2002 05:52 AM

Chen:

Yet another cool hack. I too would like to be able to delete a thread that is a link though after it has been up for awhile or you want to edit it.

Parker

Parker Clack 04-03-2002 06:55 AM

Chen:

I tried using:

Quote:

if (ismoderator($forumid) or $getperms['canopenclose'] or $getperms['candeletethread'] or $getperms['canmove'] and $thread['link']) {
$admindelete = "<a href=\"/postings.php?s=$session[sessionhash]&action=deletethread&threadid=$thread[threadid]\"><img src=\"delete.gif\" border=\"0\"></a>";
} else {
$admindelete = "&nbsp;";
}
and then just put $admindelete at the end of the hyperlink in the forumdisplay template.

Unfortunately this gives me the delete icon with every thread. I want it to only show up when $thread['link] has something in it. I played around with different items to use for $thread['link] but got nowhere. Any ideas?

Parker

Admin 04-03-2002 06:57 AM

Put that bit of code BEFORE what my hack adds. :)

Parker Clack 04-03-2002 07:10 AM

I put it before

Quote:

if (empty($thread['link'])) {
$thread['link'] = "showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]";
}
in forumdisplay.php and it still puts a delete icon after the title of any link. This was one of the first things that I tried.

Parker

Admin 04-03-2002 07:19 AM

Try in the if to use !empty($thread['link']).

Parker Clack 04-03-2002 07:31 AM

Ok I tried:

Quote:

if (ismoderator($forumid) or $getperms['canopenclose'] or $getperms['candeletethread'] or $getperms['canmove'] and !empty($thread['link']))
That didn't work either.

Parker

John 04-03-2002 01:44 PM

This would be even sweeter if there was a panel at the top of the linked page, saying "Return to forum" or something similar. <drools> :cool:

nafae 04-03-2002 04:10 PM

Quote:

Originally posted by JohnWarwick
This would be even sweeter if there was a panel at the top of the linked page, saying "Return to forum" or something similar. <drools> :cool:
And if we could delete threads :p

Admin 04-03-2002 04:27 PM

I'll add both of these things once I get some time.

John 04-03-2002 04:50 PM

Quote:

Originally posted by FireFly
I'll add both of these things once I get some time.
Schweeeet :D We like you :)

Rose 04-03-2002 05:56 PM

Deletion would be nice.....but this hack is great!

Thanks!

Parker Clack 04-03-2002 07:21 PM

I tried $thread['link']!="" and that didn't work either.

Thanks again for a great hack.

Parker

TheCaver 04-03-2002 09:16 PM

Thanks FF, works great!

JC

Zzed 04-03-2002 09:32 PM

Can you please post a plaintext instructions file?

It would be greatly appreciated. :)

DrkFusion 04-04-2002 03:28 AM

To delete one link. Has it been done? :)

Parker Clack 04-04-2002 08:12 AM

DRKfusion:

This is something that is getting worked on.

Parker

69-FLy-gUy 04-04-2002 02:47 PM

When you do the delete thread option can you add the option to make sticky?

Smoothie 04-05-2002 10:54 PM

Can someone post the plaintext version here?

Smoothie 04-06-2002 09:00 AM

Please! Can anyone help here?

Admin 04-06-2002 10:10 AM

I will post a text version of the hack in the new release.

Jawelin 04-06-2002 11:58 AM

Isn't the vbhacker export-to-txt function enough affordable ?
:grin:

philliplewisuk 04-06-2002 02:39 PM

to delete the post goto admin area and then delete the purne etc.

Gutspiller 04-06-2002 03:23 PM

Would this hack work with 2.0.3?

nafae 04-06-2002 04:00 PM

Just upload vbhacker, upload the hack, and choose "make text file" and quit whining about it.

Smoothie 04-06-2002 06:54 PM

Nafae-

If your comment is directed at me, the reason I asked for the text version is because I'm having a problem with vbHacker.

I uploaded the vbhacker.php file to my admin folder. I also uploaded the hack I wanted to install (the hack here)

But when I run the script, it gives me this error:
Warning: Variable passed to reset() is not an array or object in /home/macfora/public_html/forums/admin/vbhacker.php on line 555

Running ver 2.2.2

All I need is the hack in text version so I can install it

kippesp 04-10-2002 04:21 AM

Parker Clack, for the code in the 13th post, change it to:

Quote:

$admindelete = "";
if ((ismoderator($forumid) or $getperms['canopenclose'] or $getperms['candeletethread'] or $getperms['canmove']) and $thread['link']) {
$admindelete = "<a href=\"/postings.php?s=$session[sessionhash]&action=deletethread&threadid=$thread[threadid]\"><img src=\"delete.gif\" border=\"0\"></a>";
}
I moved the $admindelete assignment and added some parens.

Small addition to hack:
Like the hack, but I after posting a link I'd rather it not go to the link URL. To instead have the forum displayed, in file "newthread.php" change

if ($visible) {

to

if ($visible and $link=='') {

Smoothie 04-11-2002 08:18 AM

Quote:

Originally posted by FireFly
I will post a text version of the hack in the new release.
FireFly, any word on this new release?

Thanks

Admin 04-11-2002 10:06 AM

Sorry I forgot, basically all the new version has it a delete link and someone already posted that but I'll post my version anyway later.

Admin 04-11-2002 11:12 AM

And here's the text version of the new update...


All times are GMT. The time now is 10:29 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01377 seconds
  • Memory Usage 1,808KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete