vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Add-On Releases - AJAX Tabs Content Script v2 (https://vborg.vbsupport.ru/showthread.php?t=161197)

cygy2k 10-31-2007 05:25 PM

Also, I just disabled the archive links for vbSEO for now and that solved that problem.

bobster65 10-31-2007 05:36 PM

Quote:

Originally Posted by cygy2k (Post 1372911)
That is great! Is there a way to have it still show bold for unread threads, a down arrow to go to most recent unread post, etc? Sorry for sounding like a pest:)

Also - when I try to just add text to your example tabexternal.php file where the echo part is at the bottom, I always get an error message saying that a ' or ; was expected on line 46. I must not be following some sort of coding pattern I guess.

Ya, I'm working on the thread marking right now (That will include going to the most recent post)... and yer not a pest :eek: lol

as far as adding text, make sure you \ out and ' in your text..

kennethj 11-08-2007 08:32 AM

couple of request for this - now its' here for those who need it, wish to use it .
these are just edits - thanks to the author of the mod ;)

edits for AJAX Tabs Content Script v2 - vBulletin.org Forum

i use this for admin only right now -- so no demo , just images of what i see .

i am NOT a coder by no means - just figured it out for myself and .. .
am certainly no writer either .. .

in the template(s) provided from this mod :

adding more information to the new posts:

this uses all of the information i needed -
to remove unneeded fields both the sections must be edited.

the first from <td to </td for the top section (lables) and the second section (what it displays for each one), the entire line : echo '<td to /td>';

find:
Code:

echo '<table cellspacing="2" cellpadding="0" width=100%><tr> <td class="thead">Title - Date</td></tr>';
replace with :
Code:

echo '<table class="tborder" cellspacing="1" cellpadding="1" width="100%"><tr align="center"><td class="thead" width="48%" align="left">Title / Started by</td><td class="thead" width="28%">LastPost</td><td class="thead" width="4%">Replies</td><td class="thead" width="4%" nowrap="nowrap">&nbsp;Views&nbsp;</td><td class="thead" width="20%" align="left">Forum</td></tr>';
find:
Code:

                        // echo BR;

                        echo '<tr> <td class="alt1" class="smallfont">&raquo;&nbsp;<a href="http://www.DOMAIN.COM/forums/showthread.php?t=' . $thread[threadid] . '"title="' . $thread[preview] . '">' . $thread[title] . '</a> <br><span class="smallfont">&nbsp;&nbsp;&nbsp;' . $thread[postdate] . '&nbsp;' . $thread[posttime] . '</span></td></tr>';



                }
        }

$tabstring = $thread;


        $db->free_result($threads);
        unset($thread);

        $foruminfo['allowratings'] = $oldforumratings;

        if (!$mods['threadcount'] OR $mods['nodisplay'])
        {
                $show['tablerow'] = true;
                if ($mods['modcol'] == 1)
                {
                        $home["$mods[modid]"]['content'] = construct_phrase($vbphrase['no_x_to_display'], $vbphrase['threads']);
                }
                else
                {
                        $home["$mods[modid]"]['content'] = construct_phrase($vbphrase['no_x_to_display'], $vbphrase['threads']);
                }
        }

//}

echo "</table>";

replace with :
Code:

                        // echo BR;

                echo '<tr>';

                echo '<td class="alt1 smallfont">&raquo;&nbsp;<a href="/forums/showthread.php?t=' . $thread[threadid] . '"title="' . $thread[preview] . '">' . $thread[title] . '</a><div style="font-size:10px">&nbsp; &nbsp;' . $thread[postusername] . '</div></td>';

                echo '<td class="alt1 smallfont" align="right">' . $thread[lastpostdate] . '&nbsp;<span class="time">' . $thread[lastposttime] . '&nbsp;</span><div> <span style="font-size:10px">by ' . $thread[lastposter] . ' <a href="/forums/showthread.php?p=' . $thread[lastpostid] . '#post' . $thread[lastpostid] . '"></span><strong>&raquo;</strong></a>&nbsp;</div></td>';

        echo '<td class="alt2 smallfont" align="center">' . $thread[replycount] . '</td>';

        echo '<td class="alt2 smallfont" align="center">' . $thread[views] . '</td>';

        echo '<td class="alt1 smallfont">&nbsp;<a href="/forums/forumdisplay.php?f=' . $thread[forumid] . '">' . $thread[forumtitle] . '</a></td>';
                }
        }

$tabstring = $thread;


        $db->free_result($threads);
        unset($thread);

        $foruminfo['allowratings'] = $oldforumratings;

        if (!$mods['threadcount'] OR $mods['nodisplay'])
        {
                $show['tablerow'] = true;
                if ($mods['modcol'] == 1)
                {
                        $home["$mods[modid]"]['content'] = construct_phrase($vbphrase['no_x_to_display'], $vbphrase['threads']);
                }
                else
                {
                        $home["$mods[modid]"]['content'] = construct_phrase($vbphrase['no_x_to_display'], $vbphrase['threads']);
                }
        }

//}

echo "</tr></table>";

the arrow on the last post takes you to the last post.

dont' forget to change the path to your forum : is at /forums now.


to trim the thread titles to a desired length:

find : near the top :
Code:

// #######################################################################


?>

<?php

add the 2 varables or replace the section with :
Code:

// #######################################################################

$portal_threads_maxchars = '33';
$portal_threads_maxwordchars = '15';

?>

<?php

find :
Code:

                        // Trim title
                        if (strlen($thread['title']) > $mod_options['portal_threads_maxchars'] AND $mod_options['portal_threads_maxchars'])
                        {
                                $thread['title'] = fetch_trimmed_title($thread['title'], $mod_options['portal_threads_maxchars']);
                        }

                        // Check for long words that may stretch the page
                        if ($mod_options['portal_threads_maxwordchars'])
                        {
                                $thread['titlecheck'] = explode(' ', $thread['title']);

                                if (!empty($thread['titlecheck']))
                                {
                                        $thread['title'] = '';

                                        foreach ($thread['titlecheck'] AS $key => $word)
                                        {
                                                if (!$thread['titletrimmed'])
                                                {
                                                        if (strlen($word) > $mod_options['portal_threads_maxwordchars'])
                                                        {
                                                                $word = fetch_trimmed_title($word, $mod_options['portal_threads_maxwordchars']);
                                                                $thread['titletrimmed'] = true;
                                                        }

                                                        if ($thread['title'])
                                                        {
                                                                $thread['title'] .= ' ';
                                                        }

                                                        $thread['title'] .= $word;
                                                }
                                        }
                                }
                        }

replace with :
Code:

                        // Trim title
                        if (strlen($thread['title']) > $portal_threads_maxchars AND $portal_threads_maxchars)
                        {
                                $thread['title'] = fetch_trimmed_title($thread['title'], $portal_threads_maxchars);
                        }

                                                // Check for long words that may stretch the page
                        if ($portal_threads_maxwordchars)
                        {
                                $thread['titlecheck'] = explode(' ', $thread['title']);

                                if (!empty($thread['titlecheck']))
                                {
                                        $thread['title'] = '';

                                        foreach ($thread['titlecheck'] AS $key => $word)
                                        {
                                                if (!$thread['titletrimmed'])
                                                {
                                                        if (strlen($word) > $portal_threads_maxwordchars)
                                                        {
                                                                $word = fetch_trimmed_title($word, $portal_threads_maxwordchars);
                                                                $thread['titletrimmed'] = true;
                                                        }

                                                        if ($thread['title'])
                                                        {
                                                                $thread['title'] .= ' ';
                                                        }

                                                        $thread['title'] .= $word;
                                                }
                                        }
                                }
                        }

are the same 2 settings as in the vBa CP.
$portal_threads_maxchars is for how many charters are displayed.
$portal_threads_maxwordchars is for how long words are.
change the 33 and 15 to your needs.


an attempt
thread marking for new: this works DIFFERENTLY than expected - how it should!
if it was in templates it may work correctly - for me it works untill i learn how to change things.

posts will show new untill you mark the forums read manualy - there may be other conditions, its' a start.
NO i can NOT change how this is working now or how it functions!!!
am using what i thought may work and .. . it dont'.


find:
Code:

                echo '<td class="alt1 smallfont">&raquo;&nbsp;<a href="/forums/showthread.php?t=' . $thread[threadid] . '"title="' . $thread[preview] . '">' . $thread[title] . '</a><div style="font-size:10px">&nbsp; &nbsp;' . $thread[postusername] . '</div></td>';
replace with:
Code:

                                if ($show['gotonewpost'])
 
                                {
                        echo '<td class="alt1 smallfont"><a href="/forums/showthread.php?t=' . $thread[threadid] . '&amp;goto=newpost">&nabla;</a>&nbsp;<a href="/forums/showthread.php?t=' . $thread[threadid] . '"title="' . $thread[preview] . '"><strong>' . $thread[title] . '</strong></a><div style="font-size:10px">&nbsp; &nbsp;' . $thread[postusername] . '</div></td>';
                    }
                  else
                    {
                    echo '<td class="alt1 smallfont">&raquo;&nbsp;<a href="/forums/showthread.php?t=' . $thread[threadid] . '"title="' . $thread[preview] . '">' . $thread[title] . '</a><div style="font-size:10px">&nbsp; &nbsp;' . $thread[postusername] . '</div></td>';
                                        }

clicking the arrow will take you to the first new post.

NolF 11-08-2007 09:22 AM

OMG this is probabily the greates thing i've seen :O
I'll check it out propely when I have the time, but if it works as promised (and looks like it does) then it will be a great great GREAT improvement for my forums :)
so many options and possibilities to explore :O

bobster65 11-08-2007 01:17 PM

Quote:

Originally Posted by kennethj (Post 1378301)
couple of request for this - now its' here for those who need it, wish to use it .
these are just edits - thanks to the author of the mod ;)

Outstanding Kenneth :up: Thank you for the enhancements. There are a few member enhancements over at vbadvanced as well (for those of you that are interested)..

Please remember, if you are interested in enhancing or writing content addons, feel free to do so..

rapidphim 11-08-2007 07:30 PM

For whoever want to see what Ken just provided above, in LIVE, please visit here http://www.vshares.net

TheMilkCarton 11-09-2007 12:48 AM

Kenneth,

Go over to vBadvanced to check out how to REALLY integrate Thread Read Marking. :) I got it working fine for real, no having to mark forums read manually.

I also integrated forum permissions just fine, with the help of Brian over at vBadvanced. I just use the code built into vBa to apply perms.

ZiG 11-09-2007 05:24 AM

i use a GARs vBA CMPS module to show the 5-10 latest stories from my GARs article forum on the front page. it would be great to use this script to have the different article categories tabbed for visitors to switch through. i dont know php well enough to put that together myself though

having the ability to directly link to the php module files would be great too, even though i realize that is probably much more difficult to code

i was hoping to just be able to put something like

include('/home/blah/whatever.php');

in the tab files would work, but unfortunately it doesn't seem like you can do that and you actually have to put together the code. im not that great at doing that, so i hope someone creates a GARs one.

very nice script anyway

NolF 11-23-2007 01:25 AM

Damn this thing is great :) been playing with it for he last day or so. It's so damn great in every aspect :)

I got one problem, I don't seem to be able to use $thread[preview] code :( I use it but returns and empty result where it should give a preview of the threads content :(
<a href=... title="' . $thread[preview] . '"

if anyone can help me wioth that it would be great ^^

Note: I'm using kenmeth's enhancement

turkforum 11-23-2007 07:53 AM

First of all, Thank you bobster65 for this mod.. :)
My issue is kind a strange one..For that reason I want to give more detail about it..
1.I had downloaded your recentthread file and specify the forums where it will calls last threads from..
This file: https://vborg.vbsupport.ru/showpost....5&postcount=29
2.Setup templates for ajax..

At the end, It is working on firefox browser but not internet explorer..On IE, it just keeps saying "content is loading"..

Same ajax system that not calling those php files but html files working on IE (tabs with images on the top-right side)..These means ajax is working properly to my poor coding knowledge..:)
On other hand, when I type link URL of that php file to IE addres bar, it loads..Then I decide I know nothing about coding..:D

For those reasons, I am completely lost here..
Please help me out.. :)

http://www.turkforum.net/pasali.php?pageid=turkforum
+
I had mentioned same issue on previous version thread but I had no luck..


All times are GMT. The time now is 07:14 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.01432 seconds
  • Memory Usage 1,817KB
  • 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
  • (10)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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