vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Add prefix in code? (https://vborg.vbsupport.ru/showthread.php?t=209889)

MarkFoster 03-30-2009 07:04 PM

1 Attachment(s)
Well, if anybody could take a look I have the files in the attachments.

Lynne 03-30-2009 09:15 PM

Try adding thread.prefixid to the two queries in the news.php page. And then just add this under there:

PHP Code:

if ($latestthread['prefixid']) 

$thread['prefix_plain_html'] = htmlspecialchars_uni($vbphrase["prefix_$thread[prefixid]_title_plain"]); 
$thread['prefix_rich'] = $vbphrase["prefix_$thread[prefixid]_title_rich"]; 

else 

$thread['prefix_plain_html'] = ''
$thread['prefix_rich'] = ''


Put it under the lines about the iconpath but above the template eval statement.

MarkFoster 03-30-2009 09:22 PM

Quote:

Originally Posted by Lynne (Post 1780678)
Try adding thread.prefixid to the two queries in the news.php page. And then just add this under there:

PHP Code:

if ($latestthread['prefixid']) 

$thread['prefix_plain_html'] = htmlspecialchars_uni($vbphrase["prefix_$thread[prefixid]_title_plain"]); 
$thread['prefix_rich'] = $vbphrase["prefix_$thread[prefixid]_title_rich"]; 

else 

$thread['prefix_plain_html'] = ''
$thread['prefix_rich'] = ''


Put it under the lines about the iconpath but above the template eval statement.

I honestly have no idea what your talking about, would you be able to alter it and post the full code here?

Lynne 03-30-2009 09:47 PM

Is this a mod you purchased that you have exclusive rights to and can do what you want with (like posting it here)?

What about my directions don't make sense? I mean, I would like to be able to write stuff that people can understand and would love to know where I'm going wrong.

MarkFoster 03-30-2009 10:18 PM

Quote:

Originally Posted by Lynne (Post 1780694)
Is this a mod you purchased that you have exclusive rights to and can do what you want with (like posting it here)?

What about my directions don't make sense? I mean, I would like to be able to write stuff that people can understand and would love to know where I'm going wrong.

Yes I own the mod and have rights to do what I want with it.

Sorry about that, well I just don't have much of experience with it...

Lynne 03-30-2009 10:31 PM

1 Attachment(s)
OK, I just had to make sure. I was suggesting the changes in the news.php file I've attached along with the change to the template posted above. Of course, I haven't tested it at all, so try it on your test site first. If you get an error, post the exact message.

MarkFoster 03-30-2009 11:05 PM

Quote:

Originally Posted by Lynne (Post 1780709)
OK, I just had to make sure. I was suggesting the changes in the news.php file I've attached along with the change to the template posted above. Of course, I haven't tested it at all, so try it on your test site first. If you get an error, post the exact message.

Nothing at all :/
Would the changes have to be done to the module file? After all it's the module I use for the links.

Lynne 03-31-2009 02:40 AM

I am not familiar with modules at all. But, you would have to add the field to the rwc_newsarchive_bit template at least.

Oh, whoops! Change this (in there twice) "if ($latestthread['prefixid']) " to this "if ($thread['prefixid']) ".

MarkFoster 03-31-2009 02:46 AM

Quote:

Originally Posted by Lynne (Post 1780795)
I am not familiar with modules at all. But, you would have to add the field to the rwc_newsarchive_bit template at least.

Oh, whoops! Change this (in there twice) "if ($latestthread['prefixid']) " to this "if ($thread['prefixid']) ".

Now I'm even more confused, what should I do cause I don't fidn that code.

Lynne 03-31-2009 02:52 AM

They are lines in the news.php file. I forgot to change $latestthread to $thread.


All times are GMT. The time now is 08:47 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.01622 seconds
  • Memory Usage 1,747KB
  • 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
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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