| 237 | == How can I specify different default tabs for Classifieds, Polls, etc. on the Home Page?] == |
| 238 | |
| 239 | You can activate different default tabs for some blocks on the Home Page. For example, you want to display '''Random''' Blogs instead of the '''Latest''' by default. |
| 240 | |
| 241 | Open the file '''templates/base/scripts/BxBaseIndex.php''' and follow these steps: |
| 242 | |
| 243 | '''1)''' To edit the '''Members''' block, find the '''function getBlockCode_Members''' and replace the line |
| 244 | {{{ |
| 245 | $mode = 'last'; |
| 246 | }}} |
| 247 | with one of the following lines: |
| 248 | {{{ |
| 249 | $mode = 'online'; |
| 250 | $mode = 'rand'; |
| 251 | $mode = 'top'; |
| 252 | }}} |
| 253 | |
| 254 | '''2)''' To edit the '''Tags''' block, find the '''function getBlockCode_Tags''' and replace the lines |
| 255 | {{{ |
| 256 | else |
| 257 | $mode = 'profile'; |
| 258 | }}} |
| 259 | with one of the following pairs of lines: |
| 260 | {{{ |
| 261 | else |
| 262 | $mode = 'blog'; |
| 263 | |
| 264 | else |
| 265 | $mode = 'event'; |
| 266 | |
| 267 | else |
| 268 | $mode = 'photo'; |
| 269 | |
| 270 | else |
| 271 | $mode = 'video'; |
| 272 | |
| 273 | else |
| 274 | $mode = 'music'; |
| 275 | |
| 276 | else |
| 277 | $mode = 'ad'; |
| 278 | }}} |
| 279 | |
| 280 | '''3)''' To edit the '''Blogs''' block, find the '''function getBlockCode_Blogs''' and replace the line |
| 281 | {{{ |
| 282 | $mode = 'latest'; |
| 283 | }}} |
| 284 | with one of the following lines: |
| 285 | {{{ |
| 286 | $mode = 'rand'; |
| 287 | $mode = 'top'; |
| 288 | }}} |
| 289 | |
| 290 | '''4)''' To edit the '''Polls''' block, find the '''function getBlockCode_ProfilePoll''' and replace the line |
| 291 | {{{ |
| 292 | $mode = strlen($_GET['ppoll_mode']) ? $_GET['ppoll_mode'] : 'last'; |
| 293 | }}} |
| 294 | with one of the following lines: |
| 295 | {{{ |
| 296 | $mode = strlen($_GET['ppoll_mode']) ? $_GET['ppoll_mode'] : 'admin'; |
| 297 | $mode = strlen($_GET['ppoll_mode']) ? $_GET['ppoll_mode'] : 'top'; |
| 298 | $mode = strlen($_GET['ppoll_mode']) ? $_GET['ppoll_mode'] : 'rand'; |
| 299 | }}} |
| 300 | |
| 301 | '''5)''' To edit the '''Events''' block, find the '''function getBlockCode_Events''' and replace the line |
| 302 | {{{ |
| 303 | $mode = 'latest'; |
| 304 | }}} |
| 305 | with this line: |
| 306 | {{{ |
| 307 | $mode = 'rand'; |
| 308 | }}} |
| 309 | |
| 310 | '''6)''' To edit the '''Groups''' block, find the '''function getBlockCode_Groups''' and replace the line |
| 311 | {{{ |
| 312 | $mode = 'latest'; |
| 313 | }}} |
| 314 | with this line: |
| 315 | {{{ |
| 316 | $mode = 'rand'; |
| 317 | }}} |
| 318 | |
| 319 | '''7)''' To edit the '''Classifieds''' block, find the '''function getBlockCode_Classifieds''' and replace the line |
| 320 | {{{ |
| 321 | $mode = 'latest'; |
| 322 | }}} |
| 323 | with this one of these lines: |
| 324 | {{{ |
| 325 | $mode = 'rand'; |
| 326 | $mode = 'top'; |
| 327 | }}} |
| 328 | |
| 329 | '''8)''' To edit the blocks '''Video Gallery''', '''Music Gallery''' and '''Profile Photos''', you need to open the file '''inc/classes/BxDolSharedMedia.php''', find the '''function getBlockCode_SharedMedia''' and replace this line in it: |
| 330 | {{{ |
| 331 | $mode = 'last'; |
| 332 | }}} |
| 333 | with one of these lines: |
| 334 | {{{ |
| 335 | $mode = 'rand'; |
| 336 | $mode = 'top'; |
| 337 | }}} |
| 338 | |
| 339 | This will edit the all three blocks. |
| 340 | |
| 341 | ---- |
| 342 | |