منتدى استراحات زايد

منتدى استراحات زايد (http://vb.ma7room.com/index.php)
-   منتدى أخبار المواقع والمنتديات العربية والأجنبية (http://vb.ma7room.com/forumdisplay.php?f=183)
-   -   CMS Issue with article.php (http://vb.ma7room.com/showthread.php?t=395242)

محروم.كوم 04-28-2010 03:20 AM

CMS Issue with article.php
 
Allright, rare that I ask for help myself but if you know the solution I will be more than grateful!

I have been working on a forum, the owner decided to slowly introduce the new features as they were previously on Expression Engine (yuck!) and now have moved to vBulletin 4.x series and they love it however upon turning on the CMS to code it all up I received this error:

Code:
Fatal error: Call to undefined method vBCms_BBCode_HTML::get_preview() in /home/name/mysite.com/public_html/forums/packages/vbcms/content/article.php on line 639
Now, I have disabled the mods one by one assuming it was a third party modification and it is not... I even disabled a custom plugin or two I wrote for the owner however that was not it either... I do have some custom BB Codes for video tutorials however none of those bbcodes have been used on the CMS in any article :(.

Notes: I have edited the index.php and changed the default landing page to the forum, also hid the navbar tab via conditional code so only I can see it, this way the CMS can be worked on by the staff until completed and no members will see it until we reveal it etc but I wanted to note that just in case it helps determine the issue.

What I have done for now is simply modify and trick the article.php so I could view the CMS and go about my business however I do not like tricking it and would rather it function properly with the intended code!

Original Code in article.php (Lines 635 to 657):

PHP Code:
if ($showpreviewonly)
{
$bbcode_parser = new vBCms_BBCode_HTML(vB::$vbulletin, vBCms_BBCode_HTML::fetchCmsTags());
$bbcode_parser->setOutputPage(1);
$pagetext = $bbcode_parser->get_preview(
fetch_censored_text($this->content->getPageText()),
$this->default_previewlen,
vBCMS_Permissions::canUseHtml($this->getNodeId(), $this->content->getContentTypeId(), $this->content->getUserId()),
true,
$this->content->getHtmlState()
);
$view->previewtext = strip_bbcode($pagetext);
$view->preview_chopped = 1;
}
else
{
$view->previewtext = $view->pagetext;

if (
count($view->pagelist) > 1)
{
$view->preview_chopped = 1;
}
}

Modified Code:

PHP Code:
if ($showpreviewonly)
{
$view->previewtext = $view->pagetext;

if (
count($view->pagelist) > 1)
{
$view->preview_chopped = 1;
}
}
else
{
$view->previewtext = $view->pagetext;

if (
count($view->pagelist) > 1)
{
$view->preview_chopped = 1;
}
}

So as you can see I simply tricked it via duplicate code, silly and simple yet effective lol but upon refreshing the page I noticed my custom css is off a bit so could that be an underlying issue as well?

Allright I'll leave it up to my favorites Trevor, Zachery, and Lynne, if anyone beats them to it I might do you a favor in return ;).

THANKS!

Mike


الساعة الآن 05:51 PM

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2 TranZ By Almuhajir


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227