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)
-   -   FAQ Edit v3 (https://vborg.vbsupport.ru/showthread.php?t=27733)

speedway 09-17-2002 11:39 AM

Quote:

Originally posted by GamerForums
You'll see that the Groups have messed up HTML, the brackets e.t.c are included in the hyperlinks [look and you'll understand what I mean].
I haven't got a definate answer for this one however I would assume it has something to do with nested href's. If you look at the source it runs like this: <a ..............<a /a>.../a>. Now the question becomes "is this legal in HTML"?

On my board (yet to see the light of day) I have modifed this hack to have an additional title (called menutitle to be exact) that is used for "menu" parts of the display. The text in this column is just the question (no hyperlinks). The original title is then used on the "detail" part and does contain the hyperlinks. This then looks identical to the original template based version.

I may put this code up at a later date once I do the admin bit and check with Kevin that it is ok.

Sorry I couldn't be of more help.

NexDog 09-22-2002 12:35 PM

I'm running 2.2.6 and there is no FAQ mention AT ALL in misc.php. So how to replace this:
Code:

Find:

if ($action=="faq") {
$templatesused = ""; // Only one template used so load it when called
include("./global.php");
$page = intval($page);
if (!$page)
$page = '';
eval("dooutput(\"".gettemplate("faq$page")."\");");

}

Can I just add an entry anywhere in misc.php with the correct info?

speedway 09-22-2002 01:39 PM

suspect you are looking in yoursite/path-to-forum-if-any/admin/misc.php, not yoursite/path-to-forum-if-any/misc.php.

In a vanilla 2.2.6 yoursite/path-to-forum-if-any/misc.php it starts on line 96.

Oh, and don't forget to look at post #179 for the fix for variable parsing.

Cheers

NexDog 09-23-2002 04:25 AM

Damn, double files. What a crap idea. :D

Thanks man.

NexDog 09-23-2002 04:39 AM

Quote:

Originally posted by GamerForums
OK, maybe this is just me but the code in admin/index.php isn't there either, so for anyone else - this is what I did.

Find...
PHP Code:

makenavselect("User Titles");
// *** 

Below that, add...
PHP Code:

makenavoption("Add Group","faq.php?action=addfaq","|");
makenavoption("Edit Group","faq.php?action=modify","<br>");
makenavoption("Add Question","faq.php?&action=addquestion");
makenavselect("FAQ Maintenance");
// *** 

...and that should have your CP sorted. :) Seems to be running fine on 2.2.5, thanks for the tip geniuscrew and thanks for the hack tubedogg. :D

But I'm confused as the installer says:
Code:

admin/index.php

Find:

<a href="bbcode.php?s=<?php echo $session[sessionhash]; ?>&action=modify"> Modify </a>
</td></tr>

Just under that add:

<!-- FAQ addon -->
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="2" id="navtable">
<?php maketableheader("FAQs"); ?>
</table>
<a href="faq.php?s=<?php echo $session[sessionhash]; ?>&action=addquestion"> Add Question</a><br>
<a href="faq.php?s=<?php echo $session[sessionhash]; ?>&action=addfaq"> Add Group</a> |
<a href="faq.php?s=<?php echo $session[sessionhash]; ?>&action=modify"> Edit</a>
</td></tr>
<!-- /FAQ addon -->

I see no "makenavoption" instructions at all. Also, thewre is no:

<a href="bbcode.php?s=<?php echo $session[sessionhash]; ?>&action=modify"> Modify </a>
</td></tr>

In my admin/index.php at least.....

NexDog 09-23-2002 09:42 PM

Bumpety bump. ;)

NexDog 09-23-2002 10:03 PM

Okay, i added:

Code:

PHP: 

makenavoption("Add Group","faq.php?action=addfaq","|");
makenavoption("Edit Group","faq.php?action=modify","<br>");
makenavoption("Add Question","faq.php?&action=addquestion");
makenavselect("FAQ Maintenance");
// ***

And it appears okay in the admin CP. But what about:
Code:

<!-- FAQ addon -->
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="2" id="navtable">
<?php maketableheader("FAQs"); ?>
</table>
<a href="faq.php?s=<?php echo $session[sessionhash]; ?>&action=addquestion"> Add Question</a><br>
<a href="faq.php?s=<?php echo $session[sessionhash]; ?>&action=addfaq"> Add Group</a> |
<a href="faq.php?s=<?php echo $session[sessionhash]; ?>&action=modify"> Edit</a>
</td></tr>
<!-- /FAQ addon -->

I guess they are one and the same? But why the wrong instructions?

Brad 09-23-2002 10:31 PM

Quote:

Originally posted by NexDog

I guess they are one and the same? But why the wrong instructions?

the way the admin cp handels links was changed some time ago, the hack was made for a older verson that still used html to make the links in the admin cp.

Elanor 09-26-2002 04:31 PM

In line ~94 I have removed "$sql" because I had trouble after installing 4Images with VB integration.

Original:
$query = "SELECT faqid,title FROM faq $sql ORDER BY showorder";

It's now:
$query = "SELECT faqid,title FROM faq ORDER BY showorder";

Everything works fine now, but I wonder if removing the $sql could cause any trouble in future (I know almost nothing about php/sql ^^; )

Just wanted to hear your opinion about this.

FleaBag 10-29-2002 08:40 PM

The code you need to find in misc.php in 2.2.8 isn't present, so I have to uninstall this hack. :( Anyone have any ideas? Thanks in advance...


All times are GMT. The time now is 11:54 AM.

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.01245 seconds
  • Memory Usage 1,750KB
  • 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
  • (2)bbcode_php_printable
  • (3)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